Skip to content

Commit 5fcdfa5

Browse files
authored
test for decimal number in activity (#386)
1 parent 79db77f commit 5fcdfa5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/stuff_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,17 @@ def test_comparison(self):
140140
fact2.tags = ["tag", "bäg"]
141141
self.assertEqual(fact1, fact2)
142142

143+
def test_decimal_in_activity(self):
144+
# cf. issue #270
145+
fact = Fact("12:25-13:25 10.0@ABC, Two Words #tag #bäg")
146+
self.assertEqual(fact.activity, "10.0")
147+
self.assertEqual(fact.category, "ABC")
148+
self.assertEqual(fact.description, "Two Words")
149+
# should not pick up a time here
150+
fact = Fact("10.00@ABC, Two Words #tag #bäg")
151+
self.assertEqual(fact.activity, "10.00")
152+
self.assertEqual(fact.category, "ABC")
153+
self.assertEqual(fact.description, "Two Words")
154+
143155
if __name__ == '__main__':
144156
unittest.main()

0 commit comments

Comments
 (0)