diff --git a/test/test_EDM4hepFile.py b/test/test_EDM4hepFile.py index 85b76f43e..b95ed5479 100644 --- a/test/test_EDM4hepFile.py +++ b/test/test_EDM4hepFile.py @@ -41,7 +41,7 @@ def inputfile_name(pytestconfig): @pytest.fixture(scope="module") def expected_edm4hep_version(inputfile_name): """Get the expected edm4hep version from the file name""" - rgx_match = re.match(VERSIONED_FILE_RGX, inputfile_name) + rgx_match = re.search(VERSIONED_FILE_RGX, inputfile_name) if not rgx_match: return podio.version.parse(__version__) return podio.version.parse(rgx_match.group(1).replace("-", ".")) @@ -50,7 +50,7 @@ def expected_edm4hep_version(inputfile_name): @pytest.fixture(scope="module") def expected_podio_version(inputfile_name): """Get the expected edm4hep version from the file name""" - rgx_match = re.match(VERSIONED_FILE_RGX, inputfile_name) + rgx_match = re.search(VERSIONED_FILE_RGX, inputfile_name) if not rgx_match: return podio.version.build_version return podio.version.parse(rgx_match.group(2).replace("-", "."))