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

Test assertions should use constant for default sample name #194

Open
vreuter opened this issue Jul 7, 2023 · 0 comments
Open

Test assertions should use constant for default sample name #194

vreuter opened this issue Jul 7, 2023 · 0 comments
Labels

Comments

@vreuter
Copy link
Member

vreuter commented Jul 7, 2023

Right now, a few test assertions use the value of a constant, rather than the constant. If the constant changes, these will likely break. But the test logic is about effect of control flow on the presence of a particular conceptual file, not that the file has a particular name. As such, these test assertions should use string interpolation and the constant (DEFAULT_SAMPLE_NAME) to build the expected filename.

self._assertFile("sample_pipeline_DEFAULT_SAMPLE_NAME_completed.flag")
self.pp._set_status_flag("running")
self._assertNotFile("sample_pipeline_DEFAULT_SAMPLE_NAME_testing.flag")
self._assertFile("sample_pipeline_DEFAULT_SAMPLE_NAME_running.flag")

@vreuter vreuter added the tests label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant