Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Apr 11, 2019
1 parent 41d8015 commit f95a9da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vunit/test/unit/test_test_suites.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from vunit.test.common import create_tempdir
from vunit.simulator_interface import SimulatorInterface


class TestTestSuites(TestCase):
"""
Test the test suites
Expand Down Expand Up @@ -128,8 +129,9 @@ def _test_exit_code(sim_ok=True, with_has_valid_func=False):
""")
sim_if = SimulatorInterface
if with_has_valid_func:
@staticmethod
def func():
return True
return True
sim_if.has_valid_exit_code = func

run = TestRun(simulator_if=sim_if,
Expand All @@ -138,5 +140,6 @@ def func():
test_suite_name=None,
test_cases=["test1"])

done, results = run._check_results(run._read_test_results(file_name=file_name), sim_ok) # pylint: disable=protected-access
results = run._read_test_results(file_name=file_name) # pylint: disable=protected-access
done, _ = run._check_results(results, sim_ok) # pylint: disable=protected-access
return done
3 changes: 3 additions & 0 deletions vunit/test_suites.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ def run(self, output_path, read_output):
return results

def _check_results(self, results, sim_ok):
"""
Test the results and the exit code; return True the status of any test is not PASSED
"""
# If any test failed, return results
for status in results.values():
if status == FAILED:
Expand Down

0 comments on commit f95a9da

Please sign in to comment.