Run each table-driven test case in its own subTest and split the tests that check several behaviours
This commit is contained in:
@@ -100,8 +100,9 @@ class Script(unittest.TestCase):
|
||||
|
||||
def test_warns_on_the_status_line_for_input_that_is_not_a_json_object(self):
|
||||
for stdin in ("not json", "[]"):
|
||||
ran = self.run_script(stdin)
|
||||
self.assertEqual((ran.returncode, ran.stdout, ran.stderr), (0, f"{RED}warning: statusline.py's input is not a JSON object{RESET}", ""))
|
||||
with self.subTest(stdin=stdin):
|
||||
ran = self.run_script(stdin)
|
||||
self.assertEqual((ran.returncode, ran.stdout, ran.stderr), (0, f"{RED}warning: statusline.py's input is not a JSON object{RESET}", ""))
|
||||
|
||||
def run_on_branch(self, branch):
|
||||
with tempfile.TemporaryDirectory() as checkout:
|
||||
|
||||
Reference in New Issue
Block a user