-
Notifications
You must be signed in to change notification settings - Fork 244
Changing dir in test makes pytest-html fail #732
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
Comments
Oh, that's interesting! Can you provide a complete minimal example? |
Hi @BeyondEvil Please note the following behaviors:
|
Thanks for the example! As for your second bullet point. A pytest test (item) has three states: setup, call, teardown. Since we create an entry in the result table depending on where a tests fails - we can't wait until teardown has happened. Regardless, I'm 99% sure that if we fix the root issue here (which likely has to do with relative vs. absolute paths) that won't be an issue. |
Getting an error when running your example:
|
Also, I'd prefer to be able to repro this without |
Indeed it should work with absolute paths and it's simpler.
Ah yes I guess you have to initialize a git repo and commit everything to make
To run it without tox you can just create a virtualenv and do: pip install ".[test]"
pytest --html reports/pytest-py39.html |
Here is a new version to fix the version stuff, so it should be simpler to install it: pytest-html-issue-732.zip |
* Fix: Use absolute path for the report Fixes #732
I use a fixture like the following:
It was working well with
pytest-html<4
but withpytest-html>=4
I get the following error:I use the following command to call pytest in a tox job:
The text was updated successfully, but these errors were encountered: