Conversation
e9359fe to
b3ab812
Compare
Codecov Report
@@ Coverage Diff @@
## master #840 +/- ##
=======================================
Coverage 98.33% 98.34%
=======================================
Files 231 231
Lines 2590 2594 +4
=======================================
+ Hits 2547 2551 +4
Misses 43 43
Continue to review full report at Codecov.
|
| if ( | ||
| not settings.RETURN_AS_TIMEZONE_AWARE | ||
| or (settings.RETURN_AS_TIMEZONE_AWARE | ||
| and 'default' == settings.RETURN_AS_TIMEZONE_AWARE and not is_originally_aware) | ||
| ): |
There was a problem hiding this comment.
💄
| if ( | |
| not settings.RETURN_AS_TIMEZONE_AWARE | |
| or (settings.RETURN_AS_TIMEZONE_AWARE | |
| and 'default' == settings.RETURN_AS_TIMEZONE_AWARE and not is_originally_aware) | |
| ): | |
| if ( | |
| not settings.RETURN_AS_TIMEZONE_AWARE | |
| or ( | |
| not is_originally_aware | |
| and settings.RETURN_AS_TIMEZONE_AWARE == 'default' | |
| ) | |
| ): |
| logging.config.dictConfig(config) | ||
|
|
||
|
|
||
| def is_aware(date_obj): |
There was a problem hiding this comment.
💄 is_tz_aware or has_tz?
| self.then_date_was_parsed() | ||
| self.then_parsed_period_is('day') | ||
| self.then_parsed_date_is(expected_result) | ||
|
|
There was a problem hiding this comment.
Are these tests complete enough?
Given the changes I would expect a test where the date contains a timezone, settings specify a different timezone, and we check that the parsed timezone is the one from the input string, and not the one from the settings.
Also a test about the change to if settings.RETURN_AS_TIMEZONE_AWARE is not True:.
Fix
ValueErrorwhen parsing a date string that already contains timezone info with thecustom-formatsparser.fixes: #376, closes: #375