mirror of
https://github.com/kennethreitz/maya.git
synced 2026-06-05 06:46:14 +00:00
Proposed update to support MayaDT - MayaDT -> datetime.timedelta
This commit is contained in:
@@ -285,6 +285,13 @@ def test_dunder_sub():
|
||||
assert now - timedelta(seconds=1) == now.subtract(seconds=1)
|
||||
|
||||
|
||||
def test_mayaDT_sub():
|
||||
now = maya.now()
|
||||
then = now.add(days=1)
|
||||
assert then - now == timedelta(24*60*60)
|
||||
assert now - then == timedelta(-24*60*60)
|
||||
|
||||
|
||||
def test_core_local_timezone(monkeypatch):
|
||||
@property
|
||||
def mock_local_tz(self):
|
||||
|
||||
Reference in New Issue
Block a user