summaryrefslogtreecommitdiff
path: root/Lib/test/datetimetester.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r--Lib/test/datetimetester.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index b25e6c1713..bccd97aa3c 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -61,9 +61,8 @@ class TestModule(unittest.TestCase):
self.assertEqual(datetime.MAXYEAR, 9999)
def test_name_cleanup(self):
- if '_Pure' in self.__class__.__name__:
- self.skipTest('Only run for Fast C implementation')
-
+ if '_Fast' not in str(self):
+ return
datetime = datetime_module
names = set(name for name in dir(datetime)
if not name.startswith('__') and not name.endswith('__'))
@@ -73,9 +72,8 @@ class TestModule(unittest.TestCase):
self.assertEqual(names - allowed, set([]))
def test_divide_and_round(self):
- if '_Fast' in self.__class__.__name__:
- self.skipTest('Only run for Pure Python implementation')
-
+ if '_Fast' in str(self):
+ return
dar = datetime_module._divide_and_round
self.assertEqual(dar(-10, -3), 3)
@@ -2853,7 +2851,7 @@ class TestTimeTZ(TestTime, TZInfoBase, unittest.TestCase):
self.assertRaises(TypeError, t.strftime, "%Z")
# Issue #6697:
- if '_Fast' in self.__class__.__name__:
+ if '_Fast' in str(self):
Badtzname.tz = '\ud800'
self.assertRaises(ValueError, t.strftime, "%Z")