Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the version determination work for longer filenames in the backwards compatibility tests #376

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/test_EDM4hepFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("-", "."))
Expand All @@ -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("-", "."))
Expand Down
Loading