-
Notifications
You must be signed in to change notification settings - Fork 37
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
Refactor testing code #611
Comments
Here are some thoughts on how we could approach this:
One more thing: The branch on which we would perform this refactoring cannot change any of the module code to guarantee that we do not inadvertently change the behavior. |
I should split this up into smaller parts so that the code becomes easy to review. I'll probably raise smaller, more focused issues for refactoring this code. |
I created a branch |
Tests/Classes which need to be rewritten/refactored for signac-flow testing: tests/test_project.py
tests/test_aggregates.py
tests/test_directives.py
tests/test_environment.py
tests/test_shell.py
tests/test_status.py
tests/test_templates.py
tests/test_util.py
|
Motivation
While working on PR #608, I had some difficulty writing tests for traceback handlers. That sparked a discussion about how we could improve our testing code in signac-flow. This is a meta-issue meant for discussion of potential improvements to the testing code.
Potential Improvements
(Please suggest other improvements in comments on this issue. We can identify which are most actionable and create separate issues / PRs to address.)
python project.py run
) currently requires a file on disk likedefine_test_project.py
that can be passed as an entrypoint. This involves a lot of mocking code to create an environment that acts as if it a user FlowProject acting on user data. I wonder if we can do something that is more self-contained or reduces the amount of mocking needed. Perhaps even consolidatingdefine_test_project.py
and similar modules into a subfolder would help.The text was updated successfully, but these errors were encountered: