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,
|
||||
file_name)
|
||||
self.assertEqual(1, ex.exit_status)
|
||||
self.assertEqual(
|
||||
f"wc: {file_name}: No such file or directory\n",
|
||||
ex.stderr)
|
||||
self.assertIn(
|
||||
ex.stderr.strip(),
|
||||
[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):
|
||||
file_name = os.path.join(sh.make_temp_dir(),
|
||||
@ -68,9 +69,10 @@ class WcTest(testtools.TestCase):
|
||||
sh.assert_file_size,
|
||||
1, file_name)
|
||||
self.assertEqual(1, ex.exit_status)
|
||||
self.assertEqual(
|
||||
f"wc: {file_name}: No such file or directory\n",
|
||||
ex.stderr)
|
||||
self.assertIn(
|
||||
ex.stderr.strip(),
|
||||
[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):
|
||||
file_name = os.path.join(sh.make_temp_dir(),
|
||||
|
Loading…
Reference in New Issue
Block a user