Skip to content

Commit e6cdb23

Browse files
committed
update regex in modified time test to support + or - timezone offsets vs. UTC
1 parent c86b2d1 commit e6cdb23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def test_get_file_modtime():
1010
modtime = get_file_modtime(os.path.join("tests", "testfiles", "test.txt"))
1111
assert modtime.startswith("2019-09-0") is True
12-
regex = re.compile(r"""\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+-\d{2}:\d{2}""")
12+
regex = re.compile(r"""\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+[-+]\d{2}:\d{2}""")
1313
assert regex.fullmatch(modtime) is not None
1414

1515

0 commit comments

Comments
 (0)