✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.217.62
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/hc_python/lib/python3.12/site-packages/aenum//test_v37.py
from . import Enum
from dataclasses import dataclass
from unittest import TestCase


class TestEnumV37(TestCase):

        def test_repr_with_dataclass(self):
            "ensure dataclass-mixin has correct repr()"
            #
            # check overridden dataclass __repr__ is used
            #
            from dataclasses import dataclass, field
            @dataclass(repr=False)
            class Foo:
                __qualname__ = 'Foo'
                a: int
                def __repr__(self):
                    return 'ha hah!'
            class Entries(Foo, Enum):
                ENTRY1 = 1
            self.assertEqual(repr(Entries.ENTRY1), '<Entries.ENTRY1: ha hah!>')
            self.assertEqual(Entries.ENTRY1.value, Foo(1))
            self.assertTrue(isinstance(Entries.ENTRY1, Foo))
            self.assertTrue(Entries._member_type_ is Foo, Entries._member_type_)
            #
            # check auto-generated dataclass __repr__ is not used
            #
            @dataclass
            class CreatureDataMixin:
                __qualname__ = 'CreatureDataMixin'
                size: str
                legs: int
                tail: bool = field(repr=False, default=True)
            class Creature(CreatureDataMixin, Enum):
                __qualname__ = 'Creature'
                BEETLE = ('small', 6)
                DOG = ('medium', 4)
            self.assertEqual(repr(Creature.DOG), "<Creature.DOG: size='medium', legs=4>")
            #
            # check inherited repr used
            #
            class Huh:
                def __repr__(self):
                    return 'inherited'
            @dataclass(repr=False)
            class CreatureDataMixin(Huh):
                __qualname__ = 'CreatureDataMixin'
                size: str
                legs: int
                tail: bool = field(repr=False, default=True)
            class Creature(CreatureDataMixin, Enum):
                __qualname__ = 'Creature'
                BEETLE = ('small', 6)
                DOG = ('medium', 4)
            self.assertEqual(repr(Creature.DOG), "<Creature.DOG: inherited>")
            #
            # check default object.__repr__ used if nothing provided
            #
            @dataclass(repr=False)
            class CreatureDataMixin:
                __qualname__ = 'CreatureDataMixin'
                size: str
                legs: int
                tail: bool = field(repr=False, default=True)
            class Creature(CreatureDataMixin, Enum):
                __qualname__ = 'Creature'
                BEETLE = ('small', 6)
                DOG = ('medium', 4)
            self.assertRegex(repr(Creature.DOG), "<Creature.DOG: .*CreatureDataMixin object at .*>")


if __name__ == '__main__':
    raise RuntimeError("'test_v3.py' should not be run by itself; it's included in 'test.py'")



Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
11 Jun 2026 5.00 AM
root / root
0755
__pycache__
--
12 May 2025 12.34 PM
root / root
0755
doc
--
12 May 2025 12.34 PM
root / root
0755
CHANGES
9.871 KB
12 May 2025 12.34 PM
root / root
0644
LICENSE
1.489 KB
12 May 2025 12.34 PM
root / root
0644
__init__.py
1.104 KB
12 May 2025 12.34 PM
root / root
0644
_common.py
8.011 KB
12 May 2025 12.34 PM
root / root
0644
_constant.py
5.244 KB
12 May 2025 12.34 PM
root / root
0644
_enum.py
124.065 KB
12 May 2025 12.34 PM
root / root
0644
_py2.py
0.18 KB
12 May 2025 12.34 PM
root / root
0644
_py3.py
0.396 KB
12 May 2025 12.34 PM
root / root
0644
_tuple.py
18.655 KB
12 May 2025 12.34 PM
root / root
0644
test.py
279.046 KB
12 May 2025 12.34 PM
root / root
0644
test_v3.py
77.827 KB
12 May 2025 12.34 PM
root / root
0644
test_v37.py
2.783 KB
12 May 2025 12.34 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF