mirror of
https://github.com/novoid/appendfilename.git
synced 2026-02-16 12:54:15 +00:00
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 <nbehrnd@yahoo.com>
This commit is contained in:
parent
82bfd8e66e
commit
f79abfe062
2 changed files with 2 additions and 2 deletions
|
|
@ -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:]
|
||||
|
|
|
|||
|
|
@ -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:]
|
||||
|
|
|
|||
Loading…
Reference in a new issue