mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Tests: Added 'dom.tag.count' tests
This commit is contained in:
parent
2db57fa6cd
commit
630df1a16a
1 changed files with 12 additions and 0 deletions
12
test/dom.t
12
test/dom.t
|
@ -128,6 +128,18 @@ class TestDOM(TestCase):
|
||||||
code, out, err = self.t("get dom.active.duration")
|
code, out, err = self.t("get dom.active.duration")
|
||||||
self.assertRegexpMatches(out, r'PT\d+S')
|
self.assertRegexpMatches(out, r'PT\d+S')
|
||||||
|
|
||||||
|
def test_dom_tag_count_zero(self):
|
||||||
|
"""Test dom.tag.count with zero tags"""
|
||||||
|
code, out, err = self.t("get dom.tag.count")
|
||||||
|
self.assertEqual('0\n', out)
|
||||||
|
|
||||||
|
def test_dom_tag_count_two(self):
|
||||||
|
"""Test dom.tag.count with two tags"""
|
||||||
|
self.t("start one two")
|
||||||
|
code, out, err = self.t("get dom.tag.count")
|
||||||
|
self.assertEqual('2\n', out)
|
||||||
|
|
||||||
|
|
||||||
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