@@ -61,8 +61,9 @@ def test_constants(self):
6161 self .assertEqual (datetime .MAXYEAR , 9999 )
6262
6363 def test_name_cleanup (self ):
64- if '_Fast' not in str (self ):
65- return
64+ if '_Pure' in self .__class__ .__name__ :
65+ self .skipTest ('Only run for Fast C implementation' )
66+
6667 datetime = datetime_module
6768 names = set (name for name in dir (datetime )
6869 if not name .startswith ('__' ) and not name .endswith ('__' ))
@@ -72,8 +73,9 @@ def test_name_cleanup(self):
7273 self .assertEqual (names - allowed , set ([]))
7374
7475 def test_divide_and_round (self ):
75- if '_Fast' in str (self ):
76- return
76+ if '_Fast' in self .__class__ .__name__ :
77+ self .skipTest ('Only run for Pure Python implementation' )
78+
7779 dar = datetime_module ._divide_and_round
7880
7981 self .assertEqual (dar (- 10 , - 3 ), 3 )
@@ -2851,7 +2853,7 @@ def tzname(self, dt): return self.tz
28512853 self .assertRaises (TypeError , t .strftime , "%Z" )
28522854
28532855 # Issue #6697:
2854- if '_Fast' in str ( self ) :
2856+ if '_Fast' in self . __class__ . __name__ :
28552857 Badtzname .tz = '\ud800 '
28562858 self .assertRaises (ValueError , t .strftime , "%Z" )
28572859
0 commit comments