-
Notifications
You must be signed in to change notification settings - Fork 253
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
Run each test using a temporary directory (using tmp_path) #218
Conversation
In my PR #213 i use import os
import sys
sys.path.append(os.path.dirname(__file__)) And why keep order of tests is important? Remove numbering will simplify everything. |
@Czaki interesting... Does that still require changing the name of each test file to be unique? |
@joerick No. Because the directory names are proper python package names (no numbers on begin), then they are disjoined by directory name. I refactor #213 to show this (there is need of change There could be used also other conventions of name test group, like prefix |
Right, but now it needs an |
I do slightly object against having to do this in every test. That's just boilerplate code that's unrelated to the test, and repeating it each time distracts. (I do know this PR doesn't add that.)
Why do you consider this to be simpler than #217? I somehow had the opposite feeling. It's just a feeling, but if we need to do |
That's my feeling too. I think the only reason I came up with the |
@YannickJadoul @mayeut I think that hiding path to output dir is wrong idea. At least for debug purpose. |
@Czaki, |
When new release of Hiding information from developer is bad for me. |
I still don't see how it's hidden and the developer can't access it. It will only require stepping into the run command or moving a breakpoint. Regarding my comment about:
I missed the bit about adding |
16a5423
to
76deb39
Compare
So main difference between these PR and #213 is rename of folders to allow run whole dataset with pytest? |
yes |
Yeah, if we don't print the value of the The main thing I'm aiming for is to have a single test be as simple as it can be. Trying to put overhead in a single place, If we commit to going fully with |
Yes, but @joerick is not convinced of the full switch to |
76deb39
to
7ea3a24
Compare
Simpler way of getting each test to run in a unique temporary directory than #213 and #214 which also attempts to make all tests being run with a single pytest invocation.