Skip to content

Commit

Permalink
Fix other test
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Nov 22, 2018
1 parent 24909dd commit 0651d5b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/test_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,16 @@ def run_flow(datetime_format=None):
except ValidationError:
assert True

# must set format='any' to parse from datetime string
run_flow(datetime_format='any')

out_now = datetime.datetime(_now.year, _now.month, _now.day, _now.hour, _now.minute, _now.second, tzinfo=tzutc())
# Default is isoformat(), str() gives a slightly different format:
# >>> from datetime import datetime
# >>> n = datetime.now()
# >>> str(n)
# '2018-11-22 13:25:47.945209'
# >>> n.isoformat()
# '2018-11-22T13:25:47.945209'
run_flow(datetime_format='%Y-%m-%d %H:%M:%S.%f')

out_now = datetime.datetime(_now.year, _now.month, _now.day, _now.hour, _now.minute, _now.second)

assert Flow(
load('data/dump_dates/datapackage.json'),
Expand Down

0 comments on commit 0651d5b

Please sign in to comment.