mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-43162: [Enum] update docs, renable doc tests (GH-24487)
* update docs, renable doc tests * make deprecation warning active for two releases
This commit is contained in:
parent
04f6fbb696
commit
44e580f448
3 changed files with 10 additions and 9 deletions
|
@ -18,7 +18,7 @@ from datetime import timedelta
|
|||
|
||||
def load_tests(loader, tests, ignore):
|
||||
tests.addTests(doctest.DocTestSuite(enum))
|
||||
if os.path.exists('../../Doc/library/enum.rst'):
|
||||
if os.path.exists('Doc/library/enum.rst'):
|
||||
tests.addTests(doctest.DocFileSuite(
|
||||
'../../Doc/library/enum.rst',
|
||||
optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE,
|
||||
|
@ -2186,7 +2186,7 @@ class TestEnum(unittest.TestCase):
|
|||
self.assertEqual(Private._Private__major_, 'Hoolihan')
|
||||
|
||||
@unittest.skipUnless(
|
||||
sys.version_info[:2] == (3, 10),
|
||||
sys.version_info[:2] < (3, 12),
|
||||
'member-member access now raises an exception',
|
||||
)
|
||||
def test_warning_for_member_from_member_access(self):
|
||||
|
@ -2198,7 +2198,7 @@ class TestEnum(unittest.TestCase):
|
|||
self.assertIs(Di.NO, nope)
|
||||
|
||||
@unittest.skipUnless(
|
||||
sys.version_info[:2] > (3, 10),
|
||||
sys.version_info[:2] >= (3, 12),
|
||||
'member-member access currently issues a warning',
|
||||
)
|
||||
def test_exception_for_member_from_member_access(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue