File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -3354,18 +3354,15 @@ def test_fast_strftime_perf(self, strftime_format):
3354
3354
assert old_style_best < new_style_best # even better !
3355
3355
3356
3356
def test_bad_strftime_directive (self ):
3357
- """Test which kind of error is output in case of bad `date_format` directive."""
3357
+ """Test what happens in case of bad `date_format` directive."""
3358
3358
3359
- # TODO make sure that it does not become very hard for users to understand
3360
3359
x = Series (date_range ("20130101 09:00:00" , periods = 5 , freq = "us" ))
3361
3360
3362
3361
# This does not raise any error, while %D is not a correct directive !
3363
3362
x .dt .strftime (date_format = "%Y-%M-%D___" , fast_strftime = False )
3364
3363
3365
- # This raises a `TypeError: not enough arguments for format string`
3366
- with pytest .raises (TypeError ):
3367
- x .dt .strftime (date_format = "%Y-%M-%D___" )
3368
- # TODO raise a more readable error ?
3364
+ # We align with the same behaviour
3365
+ x .dt .strftime (date_format = "%Y-%M-%D___" )
3369
3366
3370
3367
@pytest .mark .parametrize ("date_format" , (
3371
3368
# note: "%Y-%m-%d %H:%M:%S and "%Y-%m-%d %H:%M:%S.%f are always accelerated (hardcoded)
You can’t perform that action at this time.
0 commit comments