From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 8 Sep 2017 22:44:33 +0000 (-0700) Subject: [3.6] bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (GH-2534) (#3405) X-Git-Tag: v3.6.3rc1~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3892799668dbf2b123a52780fd1d78f8880fdeb7;p=thirdparty%2FPython%2Fcpython.git [3.6] bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (GH-2534) (#3405) (cherry picked from commit 34b54873b51a1ebee2a3c57b7205537b4f33128d) --- diff --git a/Lib/test/test_datetime.py b/Lib/test/test_datetime.py index 2d00b56c1cce..d659f369d54e 100644 --- a/Lib/test/test_datetime.py +++ b/Lib/test/test_datetime.py @@ -32,6 +32,7 @@ for module, suffix in zip(test_modules, test_suffixes): elif issubclass(cls, unittest.TestSuite): suit = cls() 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: cls.__name__ += suffix cls.__qualname__ += suffix