Skip to content

Commit 588931d

Browse files
committed
ColTypeDate: update test for "countdown" to match current code
Copy the unit test from "relative" for the positive case of "countdown", since the code as implemented for "countdown" is identical to the code for "relative". I am including this commit, even though the next commit will override it, to confirm my understanding of how the existing datetime styles work. Initially I had gotten myself turned in circles because I misread the "if now < date then add a - sign" logic as an absolute-value calculation and badly misunderstood the behavior of "age" and "relative". See #4013
1 parent a061bdf commit 588931d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/columns.test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def test_date_format_countdown(self):
417417
"""Verify due.countdown formatting"""
418418
code, out, err = self.t("xxx rc.report.xxx.columns:id,due.countdown")
419419
self.assertRegex(out, r"1\s+")
420-
self.assertRegex(out, r"2\s+\d+\S+")
420+
self.assertRegex(out, r"2\s+[0-9.]+[hmin]+")
421421

422422
def test_date_format_unrecognized(self):
423423
"""Verify due.donkey formatting fails"""

0 commit comments

Comments
 (0)