Skip to content

pytester: parseconfigure: remove duplicate config._ensure_unconfigure #6016

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

Merged

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Oct 20, 2019

This gets done in parseconfig already.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks.

IIUC the second call was harmless and would do nothing, right?

    def _ensure_unconfigure(self):
        if self._configured:
            self._configured = False
            self.hook.pytest_unconfigure(config=self)
            self.hook.pytest_configure._call_history = []
        while self._cleanup:
            fin = self._cleanup.pop()
            fin()

If not, we should write a CHANGELOG entry because we are fixing an external behavior.

@blueyed
Copy link
Contributor Author

blueyed commented Oct 22, 2019

Shouldn't make a difference, because they are added just after each other.

@blueyed blueyed merged commit bae22e1 into pytest-dev:features Oct 22, 2019
@blueyed blueyed deleted the pytest-_ensure_unconfigure-twice branch October 22, 2019 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants