[New-bugs-announce] [issue45185] test.test_ssl.TestEnumerations is not run

Serhiy Storchaka report at bugs.python.org
Mon Sep 13 16:14:35 EDT 2021


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

test.test_ssl.TestEnumerations is not run when run ssl tests. If add it to the list of test classes it fails:

======================================================================
ERROR: test_options (test.test_ssl.TestEnumerations)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_ssl.py", line 4981, in test_options
    enum._test_simple_enum(CheckedOptions, ssl.Options)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/serhiy/py/cpython/Lib/enum.py", line 1803, in _test_simple_enum
    raise TypeError('enum mismatch:\n   %s' % '\n   '.join(failed))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: enum mismatch:
   '_use_args_':
         checked -> False
         simple  -> True
   '__format__':  checked -> <function Enum.__format__ at 0x7f18691815a0> simple -> <function IntFlag.__format__ at 0x7f1869182620>
   '__getnewargs__':  checked -> None                simple -> <method '__getnewargs__' of 'int' objects>

======================================================================
ERROR: test_sslerrornumber (test.test_ssl.TestEnumerations)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_ssl.py", line 4998, in test_sslerrornumber
    enum._test_simple_enum(Checked_SSLMethod, ssl._SSLMethod)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/serhiy/py/cpython/Lib/enum.py", line 1803, in _test_simple_enum
    raise TypeError('enum mismatch:\n   %s' % '\n   '.join(failed))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: enum mismatch:
   extra key:   'PROTOCOL_SSLv23'

======================================================================
ERROR: test_sslmethod (test.test_ssl.TestEnumerations)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_ssl.py", line 4973, in test_sslmethod
    enum._test_simple_enum(Checked_SSLMethod, ssl._SSLMethod)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/serhiy/py/cpython/Lib/enum.py", line 1803, in _test_simple_enum
    raise TypeError('enum mismatch:\n   %s' % '\n   '.join(failed))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: enum mismatch:
   extra key:   'PROTOCOL_SSLv23'

======================================================================
ERROR: test_verifyflags (test.test_ssl.TestEnumerations)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_ssl.py", line 5002, in test_verifyflags
    enum.FlagEnum, 'VerifyFlags', 'ssl',
    ^^^^^^^^^^^^^
AttributeError: module 'enum' has no attribute 'FlagEnum'

----------------------------------------------------------------------

----------
components: Tests
messages: 401723
nosy: christian.heimes, serhiy.storchaka
priority: normal
severity: normal
status: open
title: test.test_ssl.TestEnumerations is not run
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45185>
_______________________________________


More information about the New-bugs-announce mailing list