Use 'getoption' to get the basetemp value instead of private details#519
Closed
BenjaminSchubert wants to merge 1 commit intopytest-dev:masterfrom
BenjaminSchubert:bschubert/respect-basetemp
Closed
Use 'getoption' to get the basetemp value instead of private details#519BenjaminSchubert wants to merge 1 commit intopytest-dev:masterfrom BenjaminSchubert:bschubert/respect-basetemp
BenjaminSchubert wants to merge 1 commit intopytest-dev:masterfrom
BenjaminSchubert:bschubert/respect-basetemp
Conversation
pytest-dev/pytest#6767 has removed the `_tmpdirhandler` that was used to get the base temporary directory. This now reads the path to the base temporary directory directly from pytest configuration.
| if hasattr(self.config, "_tmpdirhandler"): | ||
| basetemp = self.config._tmpdirhandler.getbasetemp() | ||
| option_dict["basetemp"] = str(basetemp.join(name)) | ||
| basetemp = self.config.getoption("basetemp") |
Member
There was a problem hiding this comment.
this only fixes half of the problem, pytest will undo the removal of _tmpdirhandler until we come up with a good full solution
Author
There was a problem hiding this comment.
Oh, did I miss the issue which contained those information? What is the other half?
Thanks for the quick response!
Author
There was a problem hiding this comment.
Ah, found it: #510. I'll close this unless I get more guidance for the other part of the solution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pytest-dev/pytest#6767 has removed the
_tmpdirhandlerthat was used to get the base temporary directory.This now reads the path to the base temporary directory directly
from pytest configuration.
Fix #518
Here's a quick checklist that should be present in PRs:
Make sure to include reasonable tests for your change if necessary
We use towncrier for changelog management, so please add a news file into the
changelogfolder following these guidelines:Name it
$issue_id.$typefor example588.bugfix;If you don't have an issue_id change it to the PR id after creating it
Ensure type is one of
removal,feature,bugfix,vendor,docortrivialMake sure to use full sentences with correct case and punctuation, for example: