Skip to content
Snippets Groups Projects
Commit 64e29f8a authored by ulif's avatar ulif
Browse files

Allow also ranges of years when testing.

Yet we only allowed expressions like '2012, 2014' etc. when telling
which year a copyright was assigned at. Now we also allow ranges like
'2012-2014'.
parent 24559277
No related branches found
No related tags found
No related merge requests found
......@@ -261,7 +261,7 @@ class TestDicewareModule(object):
def test_print_version_current_year(self, capsys):
# in version infos we display the current year
print_version()
pattern = ".*\(C\) (20[0-9]{2}, )*%s.*" % (
pattern = ".*\(C\) (20[0-9]{2}([,\-] ?))*%s.*" % (
datetime.datetime.now().year)
out, err = capsys.readouterr()
assert re.match(pattern, out, re.M + re.S) is not None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment