◐ Shell
clean mode source ↗

[3.5] bpo-30822: Fix testing of datetime module. (GH-2530) by musically-ut · Pull Request #2550 · python/cpython

Expand Up @@ -53,8 +53,9 @@ def test_constants(self): self.assertEqual(datetime.MAXYEAR, 9999)
def test_name_cleanup(self): if '_Fast' not in str(self): return if '_Pure' in self.__class__.__name__: self.skipTest('Only run for Fast C implementation')
datetime = datetime_module names = set(name for name in dir(datetime) if not name.startswith('__') and not name.endswith('__')) Expand All @@ -64,8 +65,9 @@ def test_name_cleanup(self): self.assertEqual(names - allowed, set([]))
def test_divide_and_round(self): if '_Fast' in str(self): return if '_Fast' in self.__class__.__name__: self.skipTest('Only run for Pure Python implementation')
dar = datetime_module._divide_and_round
self.assertEqual(dar(-10, -3), 3) Expand Down Expand Up @@ -2733,7 +2735,7 @@ def tzname(self, dt): return self.tz self.assertRaises(TypeError, t.strftime, "%Z")
# Issue #6697: if '_Fast' in str(self): if '_Fast' in self.__class__.__name__: Badtzname.tz = '\ud800' self.assertRaises(ValueError, t.strftime, "%Z")
Expand Down