Update tests/test_param.py
Run Pytest with HTML and XML Test Reports / tests (push) Successful in 26s
Run Pytest with HTML and XML Test Reports / tests (push) Successful in 26s
This commit is contained in:
@@ -30,3 +30,15 @@ def test_multiple_positional_args(a, b):
|
||||
])
|
||||
def test_non_literal_with_id(data):
|
||||
pass
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
testdata = [
|
||||
(datetime(2001, 12, 12), datetime(2001, 12, 11), timedelta(1)),
|
||||
(datetime(2001, 12, 11), datetime(2001, 12, 12), timedelta(-1)),
|
||||
]
|
||||
|
||||
@pytest.mark.parametrize("a,b,expected", testdata, ids=["forward", "backward"])
|
||||
def test_timedistance_v1(a, b, expected):
|
||||
diff = a - b
|
||||
assert diff == expected
|
||||
Reference in New Issue
Block a user