Skip to content

bpo-38659: Properly re-intialize module variables in test_enum #25516

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
merged 1 commit into from
Apr 22, 2021

Conversation

ammaraskar
Copy link
Member

@ammaraskar ammaraskar commented Apr 22, 2021

Previously TestIntEnumConvert and TestStrEnumConvert would end up converting the module level variables from their regular int form to a test.test_enum.X instance after _convert would run. This meant that after a single test ran, the next set of _convert functions would be operating on the enum instances rather than ints. This would cause some tests such as the one involving format to fail when running under a mode that repeatedly runs test such as the refleak finder.

https://bugs.python.org/issue38659

Previously TestIntEnumConvert and TestStrEnumConvert would end up
converting the module level variables from their regular int form
to a `test.test_enum.X` instance after _convert would run. This
meant that after a single test ran, the next set of _convert
functions would be operating on the enum instances rather than
ints. This would cause some tests such as the one involving format
to fail when running under a mode that repeatedly runs test such
as the refleak finder.
@ethanfurman ethanfurman merged commit 37b173c into python:master Apr 22, 2021
@ethanfurman ethanfurman self-assigned this Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants