Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make unit tests in test_test.py independent of each other #207

Open
utsavm9 opened this issue Sep 23, 2020 · 2 comments
Open

Make unit tests in test_test.py independent of each other #207

utsavm9 opened this issue Sep 23, 2020 · 2 comments

Comments

@utsavm9
Copy link
Contributor

utsavm9 commented Sep 23, 2020

Currently, these 5 tests in test_test.py want the file __cell_coverage_test.py to not exist when each of those tests are run. These tests when call another function to make _cell_coverage_test.py.

  • test_basic_runWithReturn_pass
  • test_basic_runWithReturn_fail
  • test_basic_runWithReport_pass
  • test_basic_runWithHTMLReturn_pass
  • test_basic_runWithHTMLReturn_fail

As such, these tests have been placed in a class TestCoverage and run with --dist=loadscope when executing make testpy-distributed. This causes the tests to be run sequentially.

If we can make these tests independent of each other, then there would be no need to group them in a class and the --dist option can also be removed.

@ceball
Copy link
Collaborator

ceball commented Sep 23, 2020

Note that the real fix might well be in the underlying function(s). E.g. maybe should be using a unique temporary file.

@ceball
Copy link
Collaborator

ceball commented Sep 23, 2020

See also #125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants