I have the following error which happens only in CI:
ValueError: time data '09.30.2019 17:50 EDT' does not match format '%m.%d.%Y %H:%M %Z'
Here's my test:
def test_extract_time_from_page(pjm_html):
expected_time = datetime.strptime("09.30.2019 17:50 EDT", "%m.%d.%Y %H:%M %Z")
res = demand.extract_time_from_page(pjm_html)
assert res == expected_time
It passes locally. I'm not sure how this could be different running in a CI environment
Edit: I can reproduce this by changing my machine timezone to something other than EDT. Can you not use a timezone different than your current timezone with datetime.strptime
?