mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Tests: Added gaps test with interval and exclusions
This commit is contained in:
parent
59c74185bf
commit
838961db4b
1 changed files with 14 additions and 0 deletions
14
test/gaps.t
14
test/gaps.t
|
@ -68,6 +68,20 @@ class TestGaps(TestCase):
|
||||||
code, out, err = self.t("gaps")
|
code, out, err = self.t("gaps")
|
||||||
self.assertRegexpMatches(out, r'\s{30}11:59:59')
|
self.assertRegexpMatches(out, r'\s{30}11:59:59')
|
||||||
|
|
||||||
|
def test_single_unobstructed_interval_with_exclusions(self):
|
||||||
|
"""Add one interval, with exclusions"""
|
||||||
|
self.t.config("exclusions.monday", "<9:00 >18:00")
|
||||||
|
self.t.config("exclusions.tuesday", "<9:00 >18:00")
|
||||||
|
self.t.config("exclusions.wednesday", "<9:00 >18:00")
|
||||||
|
self.t.config("exclusions.thursday", "<9:00 >18:00")
|
||||||
|
self.t.config("exclusions.friday", "<9:00 >18:00")
|
||||||
|
self.t.config("exclusions.saturday", "<9:00 >18:00")
|
||||||
|
self.t.config("exclusions.sunday", "<9:00 >18:00")
|
||||||
|
self.t("track 10am - 2pm foo")
|
||||||
|
|
||||||
|
code, out, err = self.t("gaps")
|
||||||
|
self.assertRegexpMatches(out, r'\s{30}5:00:00')
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from simpletap import TAPTestRunner
|
from simpletap import TAPTestRunner
|
||||||
unittest.main(testRunner=TAPTestRunner())
|
unittest.main(testRunner=TAPTestRunner())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue