mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Tests: Added 'dom.tracked.N.duration' tests
This commit is contained in:
parent
ad40ec4ed9
commit
4313dbb708
1 changed files with 10 additions and 0 deletions
10
test/dom.t
10
test/dom.t
|
@ -234,6 +234,16 @@ class TestDOMTracked(TestCase):
|
|||
code, out, err = self.t("get dom.tracked.1.end")
|
||||
self.assertEqual('\n', out)
|
||||
|
||||
def test_dom_tracked_duration_inactive(self):
|
||||
"""Test dom.tracked.N.duration of closed track"""
|
||||
code, out, err = self.t("get dom.tracked.2.duration")
|
||||
self.assertRegexpMatches(out, r'P1D')
|
||||
|
||||
def test_dom_tracked_duration_active(self):
|
||||
"""Test dom.tracked.duration with open track"""
|
||||
code, out, err = self.t("get dom.tracked.1.duration")
|
||||
self.assertRegexpMatches(out, r'PT\d+S')
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue