mirror of
https://github.com/kennethreitz/maya.git
synced 2026-06-05 23:00:18 +00:00
pytest
This commit is contained in:
@@ -2,6 +2,8 @@ dateparser==0.5.0
|
||||
humanize==0.5.1
|
||||
iso8601==0.1.11
|
||||
jdatetime==1.8.1
|
||||
py==1.4.32
|
||||
pytest==3.0.5
|
||||
python-dateutil==2.6.0
|
||||
pytz==2016.10
|
||||
regex==2016.11.21
|
||||
|
||||
@@ -20,6 +20,13 @@ class SimpleTest(unittest.TestCase):
|
||||
|
||||
assert r2.day - r1.day == 1
|
||||
|
||||
def test_dt_tz_translation(self):
|
||||
d1 = maya.now().datetime()
|
||||
d2 = maya.now().datetime(to_timezone='US/Eastern')
|
||||
assert d1.hour - d2.hour == 5
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user