Skip to content

Commit 142324a

Browse files
authored
Make the CLI test a mixin class
1 parent 0c2b231 commit 142324a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Lib/test/test_uuid.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,9 +1141,7 @@ def test_uuid_weakref(self):
11411141
self.assertIs(strong, weak())
11421142

11431143

1144-
class TestUUIDCommandLineRunTime(unittest.TestCase):
1145-
uuid = py_uuid
1146-
1144+
class TestUUIDCommandLineRunTimeMixin:
11471145
def do_test_standalone_uuid(self, version):
11481146
stdout = io.StringIO()
11491147
with contextlib.redirect_stdout(stdout):
@@ -1244,12 +1242,12 @@ def test_cli_uuid8(self):
12441242
self.do_test_standalone_uuid(8)
12451243

12461244

1247-
class TestUUIDWithoutExtModule(BaseTestUUID, unittest.TestCase):
1245+
class TestUUIDWithoutExtModule(TestUUIDCommandLineRunTimeMixin, BaseTestUUID, unittest.TestCase):
12481246
uuid = py_uuid
12491247

12501248

12511249
@unittest.skipUnless(c_uuid, 'requires the C _uuid module')
1252-
class TestUUIDWithExtModule(BaseTestUUID, unittest.TestCase):
1250+
class TestUUIDWithExtModule(TestUUIDCommandLineRunTimeMixin, BaseTestUUID, unittest.TestCase):
12531251
uuid = c_uuid
12541252

12551253
def check_has_stable_libuuid_extractable_node(self):

0 commit comments

Comments
 (0)