Skip to content

DeprecationWarning in test_enum #93216

Description

@tirkarthi

Bug report

DeprecationWarning in test_enum due to changes in #25670 with tests being now ran on Python 3.12

./python -Wall -m test test_enum
0:00:00 load avg: 1.01 Run tests sequentially
0:00:00 load avg: 1.01 [1/1] test_enum
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:2967: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertFalse('BLACK' in Color)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)
/home/karthikeyan/stuff/python/cpython/Lib/test/test_enum.py:374: DeprecationWarning: in 3.12 __contains__ will no longer raise TypeError, but will return True or
False depending on whether the value is a member or the value of a member
  self.assertTrue(self.source_values[0] in MainEnum)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 556 ms
Tests result: SUCCESS

Your environment

  • CPython versions tested on: Python 3.12.0a0 (heads/main:9485a0dbdd, May 25 2022, 17:36:25) [GCC 9.4.0] on linux
  • Operating system and architecture: Linux

Activity

  1. added
    testsTests in the Lib/test dir
    3.12only security fixes
    on May 25, 2022
  2. corona10 commented on May 25, 2022

    @corona10
    Member
  3. tirkarthi commented on May 25, 2022

    @tirkarthi
    MemberAuthor

    Thanks @corona10 , I searched for test_enum in GitHub and didn't come across the linked issue. Feel free to close this if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.12only security fixestestsTests in the Lib/test dir

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions