gh-95591: [Enum] use `_FlagTests` base class (GH-96475)

This commit is contained in:
Nikita Sobolev 2022-09-21 02:08:39 +03:00 committed by GitHub
parent a3e2f054d2
commit 9b58eaf98c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -777,7 +777,7 @@ class _FlagTests:
def test_default_missing_with_wrong_type_value(self):
with self.assertRaisesRegex(
ValueError,
"'RED' is not a valid TestFlag.Color",
"'RED' is not a valid ",
) as ctx:
self.MainEnum('RED')
self.assertIs(ctx.exception.__context__, None)
@ -786,7 +786,7 @@ class TestPlainEnum(_EnumTests, _PlainOutputTests, unittest.TestCase):
enum_type = Enum
class TestPlainFlag(_EnumTests, _PlainOutputTests, unittest.TestCase):
class TestPlainFlag(_EnumTests, _PlainOutputTests, _FlagTests, unittest.TestCase):
enum_type = Flag
@ -798,7 +798,7 @@ class TestStrEnum(_EnumTests, _MinimalOutputTests, unittest.TestCase):
enum_type = StrEnum
class TestIntFlag(_EnumTests, _MinimalOutputTests, unittest.TestCase):
class TestIntFlag(_EnumTests, _MinimalOutputTests, _FlagTests, unittest.TestCase):
enum_type = IntFlag
@ -810,7 +810,7 @@ class TestMixedStr(_EnumTests, _MixedOutputTests, unittest.TestCase):
class enum_type(str, Enum): pass
class TestMixedIntFlag(_EnumTests, _MixedOutputTests, unittest.TestCase):
class TestMixedIntFlag(_EnumTests, _MixedOutputTests, _FlagTests, unittest.TestCase):
class enum_type(int, Flag): pass