@@ -208,6 +208,8 @@ def test_strftime_invalid_format(self):
208208 except ValueError as exc :
209209 self .assertEqual (str (exc ), 'Invalid format string' )
210210
211+ # TODO: RUSTPYTHON; chrono fallback on Windows does not preserve surrogates
212+ @unittest .expectedFailureIf (sys .platform == "win32" , "TODO: RUSTPYTHON" )
211213 def test_strftime_special (self ):
212214 tt = time .gmtime (self .t )
213215 s1 = time .strftime ('%c' , tt )
@@ -292,6 +294,8 @@ def _bounds_checking(self, func):
292294 self .assertRaises (ValueError , func ,
293295 (1900 , 1 , 1 , 0 , 0 , 0 , 0 , 367 , - 1 ))
294296
297+ # TODO: RUSTPYTHON; chrono on Windows rejects month=0/day=0 and raises wrong error type
298+ @unittest .expectedFailureIf (sys .platform == "win32" , "TODO: RUSTPYTHON" )
295299 def test_strftime_bounding_check (self ):
296300 self ._bounds_checking (lambda tup : time .strftime ('' , tup ))
297301
@@ -308,6 +312,8 @@ def test_strftime_format_check(self):
308312 except ValueError :
309313 pass
310314
315+ # TODO: RUSTPYTHON; chrono on Windows does not handle month=0/day=0 in struct_time
316+ @unittest .expectedFailureIf (sys .platform == "win32" , "TODO: RUSTPYTHON" )
311317 def test_default_values_for_zero (self ):
312318 # Make sure that using all zeros uses the proper default
313319 # values. No test for daylight savings since strftime() does
@@ -318,6 +324,8 @@ def test_default_values_for_zero(self):
318324 result = time .strftime ("%Y %m %d %H %M %S %w %j" , (2000 ,)+ (0 ,)* 8 )
319325 self .assertEqual (expected , result )
320326
327+ # TODO: RUSTPYTHON; chrono %Z on Windows not compatible with strptime
328+ @unittest .expectedFailureIf (sys .platform == "win32" , "TODO: RUSTPYTHON" )
321329 @skip_if_buggy_ucrt_strfptime
322330 def test_strptime (self ):
323331 # Should be able to go round-trip from strftime to strptime without
@@ -357,6 +365,8 @@ def test_strptime_leap_year(self):
357365 r'.*day of month without a year.*' ):
358366 time .strptime ('02-07 18:28' , '%m-%d %H:%M' )
359367
368+ # TODO: RUSTPYTHON; chrono on Windows cannot handle month=0/big years
369+ @unittest .expectedFailureIf (sys .platform == "win32" , "TODO: RUSTPYTHON" )
360370 def test_asctime (self ):
361371 time .asctime (time .gmtime (self .t ))
362372
@@ -372,9 +382,13 @@ def test_asctime(self):
372382 self .assertRaises (TypeError , time .asctime , ())
373383 self .assertRaises (TypeError , time .asctime , (0 ,) * 10 )
374384
385+ # TODO: RUSTPYTHON; chrono on Windows rejects month=0/day=0
386+ @unittest .expectedFailureIf (sys .platform == "win32" , "TODO: RUSTPYTHON" )
375387 def test_asctime_bounding_check (self ):
376388 self ._bounds_checking (time .asctime )
377389
390+ # TODO: RUSTPYTHON; chrono on Windows formats negative years differently
391+ @unittest .expectedFailureIf (sys .platform == "win32" , "TODO: RUSTPYTHON" )
378392 def test_ctime (self ):
379393 t = time .mktime ((1973 , 9 , 16 , 1 , 3 , 52 , 0 , 0 , - 1 ))
380394 self .assertEqual (time .ctime (t ), 'Sun Sep 16 01:03:52 1973' )
@@ -495,6 +509,8 @@ def test_localtime_without_arg(self):
495509 t1 = time .mktime (lt1 )
496510 self .assertAlmostEqual (t1 , t0 , delta = 0.2 )
497511
512+ # TODO: RUSTPYTHON; chrono on Windows mktime round-trip fails for negative timestamps
513+ @unittest .expectedFailureIf (sys .platform == "win32" , "TODO: RUSTPYTHON" )
498514 def test_mktime (self ):
499515 # Issue #1726687
500516 for t in (- 2 , - 1 , 0 , 1 ):
@@ -747,13 +763,22 @@ def test_negative(self):
747763
748764
749765class TestAsctime4dyear (_TestAsctimeYear , _Test4dYear , unittest .TestCase ):
750- pass
766+ # TODO: RUSTPYTHON; chrono on Windows cannot handle month=0/day=0 in struct_time
767+ if sys .platform == "win32" :
768+ test_year = unittest .expectedFailure (lambda self : _Test4dYear .test_year (self ))
769+ test_large_year = unittest .expectedFailure (lambda self : _Test4dYear .test_large_year (self ))
770+ test_negative = unittest .expectedFailure (lambda self : _Test4dYear .test_negative (self ))
751771
752772class TestStrftime4dyear (_TestStrftimeYear , _Test4dYear , unittest .TestCase ):
753- pass
773+ # TODO: RUSTPYTHON; chrono on Windows cannot handle month=0/day=0 in struct_time
774+ if sys .platform == "win32" :
775+ test_large_year = unittest .expectedFailure (lambda self : _TestStrftimeYear .test_large_year (self ))
776+ test_negative = unittest .expectedFailure (lambda self : _TestStrftimeYear .test_negative (self ))
754777
755778
756779class TestPytime (unittest .TestCase ):
780+ # TODO: RUSTPYTHON; chrono %Z on Windows gives offset instead of timezone name
781+ @unittest .expectedFailureIf (sys .platform == "win32" , "TODO: RUSTPYTHON" )
757782 @skip_if_buggy_ucrt_strfptime
758783 @unittest .skipUnless (time ._STRUCT_TM_ITEMS == 11 , "needs tm_zone support" )
759784 def test_localtime_timezone (self ):
0 commit comments