From ca94926dc886f9449ec6381ce3e7cd366898dd22 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Fri, 22 Dec 2023 14:32:43 +0100 Subject: [PATCH] fix ftguess unittests for windows hard-coded "/" directory separator --- tests/ftguess/test_basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ftguess/test_basic.py b/tests/ftguess/test_basic.py index bc63cd76..646d46b3 100644 --- a/tests/ftguess/test_basic.py +++ b/tests/ftguess/test_basic.py @@ -109,7 +109,7 @@ def test_encoding(self): """Check whether text file encoding is detected correctly""" n_matches = 0 for filename, file_contents in loop_over_files(subdir='basic'): - match = re.match(r'basic/test-sample-(ascii|latin1|utf[816_lbe]+)(?:-nobom|-withbom)?.txt', filename) + match = re.match(r'basic.test-sample-(ascii|latin1|utf[816_lbe]+)(?:-nobom|-withbom)?.txt', filename) if not match: continue n_matches += 1