Skip to content

Commit

Permalink
Move strptime test to relevant space
Browse files Browse the repository at this point in the history
  • Loading branch information
waqasshabbir committed Jun 7, 2017
1 parent 1563a2c commit 0a7eef5
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tests/test_utils_strptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,8 @@ def test_parsing_date_should_fail_using_datetime_strptime_if_locale_is_non_engli
param('12 Dec 10 10:30:55.000011', '%d %b %y %H:%M:%S.%f', expected=datetime(2010, 12, 12, 10, 30, 55, 11)),
param('12 Dec 10 10:30:55.000111', '%d %b %y %H:%M:%S.%f', expected=datetime(2010, 12, 12, 10, 30, 55, 111)),
param('12 Feb 2016 11:41:23', '%d %b %Y %I:%M:%S', expected=datetime(2016, 2, 12, 11, 41, 23)),
param('11 Dec 10 10:30:2011.999999', '%y %b %S %H:%M:%Y.%f', expected=datetime(2011, 12, 1, 10, 30, 10, 999999)),
])
def test_microseconds_are_parsed_correctly(self, date_string, fmt, expected):
self.when_date_string_is_parsed(date_string, fmt)
self.then_date_object_is(expected)

@parameterized.expand([
param('11 Dec 10 10:30:2011.999999', '%y %b %S %H:%M:%Y.%f',
expected=datetime(2011, 12, 1, 10, 30, 10, 999999)),
])
def test_not_parsing_microseconds_attribute_error(self, datestring, fmt, expected):
self.assertEqual(strptime(datestring, fmt), expected)

0 comments on commit 0a7eef5

Please sign in to comment.