]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38659: Properly re-intialize module variables in test_enum (GH-25516)
authorAmmar Askar <ammar@ammaraskar.com>
Thu, 22 Apr 2021 03:22:58 +0000 (23:22 -0400)
committerGitHub <noreply@github.com>
Thu, 22 Apr 2021 03:22:58 +0000 (20:22 -0700)
commit37b173c5231b7b202859af97c17bc3d04b1e4c75
tree9d991e7a8b5477702d836426d2a1f9627c9f9e2c
parentdc516ef8395d15da0ab225eb0dceb2e0581f51ca
bpo-38659: Properly re-intialize module variables in test_enum (GH-25516)

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.
Lib/test/test_enum.py