-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No need to keep a counter, just try to pop from the stack if any
- Loading branch information
Showing
1 changed file
with
2 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
c232828
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.
Then you will pop too early. If there is more than one config on the stack you will pop the last config even when the current session didn't start and you will end up in a session without a config on the stack
c232828
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.
The whole config stack was just made to make the tests in this project to work (IIRC the config stack was implemented because we saw some test pollution in the test suite of this project).
Projects using this library should not encounter this issue, since pytest_unconfigure is supposed to be called once per pytest invocation.