Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Apr 14, 2019
1 parent cdd5663 commit bb8d093
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions vunit/test/unit/test_test_suites.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ def test_read_results_unknown_test(self):
self._read_test_results(["test1"], """\
test_start:test1
test_start:test3
test_suite_done""", False)
test_suite_done""")
except RuntimeError as exc:
self.assertIn("unknown test case test3", str(exc))
else:
assert False, "RuntimeError not raised"

def _read_test_results(self, expected, contents, do_assert=True):
def _read_test_results(self, expected, contents):
"""
Helper method to test the read_test_results function
"""
Expand All @@ -84,8 +84,7 @@ def _read_test_results(self, expected, contents, do_assert=True):
test_suite_name=None,
test_cases=expected)
results = run._read_test_results(file_name=file_name) # pylint: disable=protected-access
if do_assert:
self.assertEqual(results, expected)
self.assertEqual(results, expected)
return results

def test_exit_code(self):
Expand Down Expand Up @@ -149,7 +148,7 @@ def func():
test_cases=expected)

results = run._read_test_results(file_name=file_name) # pylint: disable=protected-access
done, results = run._check_results(results, sim_ok) # pylint: disable=protected-access
self.assertEqual(results, expected)
self.assertEqual(done, waschecked)
return done
self.assertEqual(
run._check_results(results, sim_ok), # pylint: disable=protected-access
(waschecked, expected)
)

0 comments on commit bb8d093

Please sign in to comment.