Fix test_wc
Change-Id: If052b158dedaaef2d442669565f01bd7f54ab7ef
This commit is contained in:
parent
f7fd956ed2
commit
4e6f9bafed
@ -45,9 +45,10 @@ class WcTest(testtools.TestCase):
|
|||||||
sh.get_file_size,
|
sh.get_file_size,
|
||||||
file_name)
|
file_name)
|
||||||
self.assertEqual(1, ex.exit_status)
|
self.assertEqual(1, ex.exit_status)
|
||||||
self.assertEqual(
|
self.assertIn(
|
||||||
f"wc: {file_name}: No such file or directory\n",
|
ex.stderr.strip(),
|
||||||
ex.stderr)
|
[f"wc: {file_name}: No such file or directory",
|
||||||
|
f"wc: {file_name}: open: No such file or directory"])
|
||||||
|
|
||||||
def test_assert_file_size(self):
|
def test_assert_file_size(self):
|
||||||
file_name = os.path.join(sh.make_temp_dir(),
|
file_name = os.path.join(sh.make_temp_dir(),
|
||||||
@ -68,9 +69,10 @@ class WcTest(testtools.TestCase):
|
|||||||
sh.assert_file_size,
|
sh.assert_file_size,
|
||||||
1, file_name)
|
1, file_name)
|
||||||
self.assertEqual(1, ex.exit_status)
|
self.assertEqual(1, ex.exit_status)
|
||||||
self.assertEqual(
|
self.assertIn(
|
||||||
f"wc: {file_name}: No such file or directory\n",
|
ex.stderr.strip(),
|
||||||
ex.stderr)
|
[f"wc: {file_name}: No such file or directory",
|
||||||
|
f"wc: {file_name}: open: No such file or directory"])
|
||||||
|
|
||||||
def test_assert_file_size_when_mismatch(self):
|
def test_assert_file_size_when_mismatch(self):
|
||||||
file_name = os.path.join(sh.make_temp_dir(),
|
file_name = os.path.join(sh.make_temp_dir(),
|
||||||
|
Loading…
Reference in New Issue
Block a user