-
Notifications
You must be signed in to change notification settings - Fork 241
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
Use pytest tmp_dir fixture for safe test paths #4287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks OK to me.
Good thing we have computers; the CI has informed me that actually this can never work, because it's adding parameters without default values to functions in the tests that start with
@mr-c If the path to use isn't going to come from I think either the new arguments need default values, or the functions need to be renamed to not start with |
|
So maybe someplace in the CI we are running the tests using |
6cc7a53
to
4e819a2
Compare
@adamnovak I converted the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably work? I'm worried that if we do everything like this we'll end up with a lot of marks, though, and we won't get to use the stuff we put in ToilTest
.
@@ -35,6 +35,8 @@ markers = | |||
tes | |||
torque | |||
wes_server | |||
cwl_small_log_dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mark mean anything about the tests (like they need something) or is it just a category of tests so we can run them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, I didn't write the original test classes (CWLSmallLogDir
, CWLSmallTests
). I added the marks so that the cwl_misc
gitlab job could still select them. We would split the test categories by files instead, then marks wouldn't needed.
As running the tests post-installation can result in errors otherwise
4e819a2
to
8f96468
Compare
@adamnovak If you want, I can turn the ToilTest class attributes/methods into pytest fixtures in a separate PR. That will be more flexible and explicit. |
As running the tests post-installation can result in errors otherwise. We need this for the Debian package of
toil
Changelog Entry
To be copied to the draft changelog by merger:
Reviewer Checklist
issues/XXXX-fix-the-thing
in the Toil repo, or from an external repo.camelCase
that want to be insnake_case
.docs/running/{cliOptions,cwl,wdl}.rst
Merger Checklist