◐ Shell
reader mode source ↗
Skip to content

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

Merged
ethanfurman merged 1 commit into
python:masterfrom
ammaraskar:test_enum_refleaks
Apr 22, 2021
Merged

bpo-38659: Properly re-intialize module variables in test_enum#25516
ethanfurman merged 1 commit into
python:masterfrom
ammaraskar:test_enum_refleaks

Conversation

@ammaraskar

@ammaraskar ammaraskar commented Apr 22, 2021

Copy link
Copy Markdown
Member

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