-
Notifications
You must be signed in to change notification settings - Fork 11
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
The working directory inside of a @testitem
block does not point to the package test directory or root directory.
#40
Comments
You can use the |
Yeah, that's the correct solution I think. Arguably we could set the working directory to the package dir though. |
So the main question is: package dir or folder of the file in which the test is defined :) I had a Slack question on that, and folks came down on both sides. So I'm not sure what to do... |
Option 3 is "document the current behaviour and discourage people from relying on |
Haha, you mean having a different choice in VS Code and the command line runner ;) Not really ideal, I would say :) |
Random working dir to really drive the point home maybe? But yeah, agreed. Imho a consistent working dir across all tests would be the nicer choice. |
Hey folks. My sense is that in the absence of an optimal solution it is still best to have a consistent solution. So starting from the package directory or starting from the test file directory would be fine, it should just be consistent. Then the users can work around that. |
Let's make it the folder of the file where the test is defined. If at some point in the future we want to allow tests outside of packages that would still work. |
I think this is resolved now |
I am building a package and was starting to use
@testitem
for tests.The
@testitem
block seems to set the working directory as my user home directory, instead of the local directory of the testing file, or the package root directory. I have some code such as:The impact is that I have some test files that I download while testing in CI. So the issue with the working directory means that the path to my test files won't work, or has to be hard coded--which is usually not the best :).
I get an output that looks like below in the test output:
Please let me know if you need any additional detail.
The text was updated successfully, but these errors were encountered: