-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time zone capitilization #164
Changes from all commits
e877a0d
2d709ff
f858d31
c84a7b5
78194cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,15 +53,21 @@ class TestModelFrameworkMST(SMRFTestCase): | |
""" | ||
Test timezone handling for MST. | ||
""" | ||
TIMEZONE = pytz.timezone('US/Mountain') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Little did I know that MST is the way to go and 'US/Mountain' is deprecated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
TIMEZONE = pytz.timezone('MST') | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
base_config = copy.deepcopy(cls.base_config) | ||
base_config.cfg['time']['time_zone'] = str(cls.TIMEZONE) | ||
base_config.cfg['time']['time_zone'] = 'MST' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did this call need to b changed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a more real world application as we don't typically pass a pytz object. This will also test that the inicheck parser is working. Then |
||
cls.smrf = SMRF(base_config) | ||
|
||
def test_timezone_error(self): | ||
base_config = copy.deepcopy(self.base_config) | ||
base_config.cfg['time']['time_zone'] = 'mst' | ||
with self.assertRaises(Exception): | ||
SMRF(base_config) | ||
|
||
def test_start_date(self): | ||
self.assertEqual( | ||
self.smrf.start_date, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this would be worth opening a ticket for and move into 'inicheck'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
USDA-ARS-NWRC/inicheck#55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USDA-ARS-NWRC/inicheck/issues/54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we can flip a coin :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You got a lower number so you won!