From f79abfe06298eec70da2f8e47c872d27fd577ab0 Mon Sep 17 00:00:00 2001 From: Norwid Behrnd Date: Tue, 12 Nov 2024 18:06:24 +0100 Subject: [PATCH] test: correct pytest regex, test_smart_prepend The regex condition did not match the pattern previously established by Karl Voit -- erroneously, it would fail on the 30th and 31st of each relevant month expressed with the short date stamp (YYMMDD) of date2name. Signed-off-by: Norwid Behrnd --- test_appendfilename.py | 2 +- test_generator.org | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test_appendfilename.py b/test_appendfilename.py index e930c07..a680818 100755 --- a/test_appendfilename.py +++ b/test_appendfilename.py @@ -283,7 +283,7 @@ def test_smart_prepend(arg1, arg2, arg3): old_filename_no_timestamp = old_filename[8:] # pattern `--short` # currently fails - elif re.search(r"^\d{4}[012]\d[012]\d", old_filename): + elif re.search(r"^\d{4}[012]\d[0-3]\d", old_filename): time_stamp = old_filename[:6] time_stamp_separator = old_filename[6] old_filename_no_timestamp = old_filename[7:] diff --git a/test_generator.org b/test_generator.org index fc94086..fe27ac8 100755 --- a/test_generator.org +++ b/test_generator.org @@ -467,7 +467,7 @@ def test_smart_prepend(arg1, arg2, arg3): old_filename_no_timestamp = old_filename[8:] # pattern `--short` # currently fails - elif re.search(r"^\d{4}[012]\d[012]\d", old_filename): + elif re.search(r"^\d{4}[012]\d[0-3]\d", old_filename): time_stamp = old_filename[:6] time_stamp_separator = old_filename[6] old_filename_no_timestamp = old_filename[7:]