[3.6] bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (GH-2534) (#3405)
(cherry picked from commit 34b54873b5
)
This commit is contained in:
parent
ef18b0dab9
commit
3892799668
|
@ -32,6 +32,7 @@ for module, suffix in zip(test_modules, test_suffixes):
|
||||||
elif issubclass(cls, unittest.TestSuite):
|
elif issubclass(cls, unittest.TestSuite):
|
||||||
suit = cls()
|
suit = cls()
|
||||||
test_classes.extend(type(test) for test in suit)
|
test_classes.extend(type(test) for test in suit)
|
||||||
|
test_classes = sorted(set(test_classes), key=lambda cls: cls.__qualname__)
|
||||||
for cls in test_classes:
|
for cls in test_classes:
|
||||||
cls.__name__ += suffix
|
cls.__name__ += suffix
|
||||||
cls.__qualname__ += suffix
|
cls.__qualname__ += suffix
|
||||||
|
|
Loading…
Reference in New Issue