diff --git a/__pycache__/test_times.cpython-39-pytest-7.1.1.pyc b/__pycache__/test_times.cpython-39-pytest-7.1.1.pyc new file mode 100644 index 0000000..2745521 Binary files /dev/null and b/__pycache__/test_times.cpython-39-pytest-7.1.1.pyc differ diff --git a/__pycache__/times.cpython-39.pyc b/__pycache__/times.cpython-39.pyc new file mode 100644 index 0000000..92f2092 Binary files /dev/null and b/__pycache__/times.cpython-39.pyc differ diff --git a/test_times.py b/test_times.py new file mode 100644 index 0000000..4125dd4 --- /dev/null +++ b/test_times.py @@ -0,0 +1,10 @@ +from times import compute_overlap_time, time_range + +def test_given_input(): + + large = time_range("2010-01-12 10:00:00", "2010-01-12 12:00:00") + short = time_range("2010-01-12 10:30:00", "2010-01-12 10:45:00", 2, 60) + result = compute_overlap_time(large,short) + expected = [('2010-01-12 10:30:00', '2010-01-12 10:37:00'), ('2010-01-12 10:38:00', '2010-01-12 10:45:00')] + assert result == expected +