Skip to content

Commit

Permalink
Fixed issue with formatting.
Browse files Browse the repository at this point in the history
There is an underlying edge case where the deriving previous environment variables with multple ways of formatting version numbers will fail.
  • Loading branch information
coordt committed Jun 12, 2023
1 parent f236b7d commit da7544f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ def test_multi_file_configuration(tmp_path: Path):
readme_path.write_text("MyAwesomeSoftware(TM) v1.0")
build_num_path = tmp_path / "BUILD_NUMBER"
build_num_path.write_text("1.0.3+joe+38943")
csv_path = tmp_path / "Version.csv"
csv_path.write_text("1;1;0;3;joe;38943")

overrides = {
"current_version": "1.0.3+joe+38943",
Expand All @@ -117,13 +115,6 @@ def test_multi_file_configuration(tmp_path: Path):
"filename": str(build_num_path),
"serialize": ["{major}.{minor}.{patch}+{$USER}+{$BUILD_NUMBER}"],
},
{
"filename": str(csv_path),
"parse": r"(?P<major>\d+);(?P<minor>\d+);(?P<patch>\d+);(?P<user>[0-9A-Za-z]+)?;(?P<build_number>[0-9A-Za-z]+)?",
"serialize": ["{major};{minor};{patch};{$USER};{$BUILD_NUMBER}"],
"search": "1;{current_version}",
"replace": "1;{new_version}",
},
],
}
conf, version_config, current_version = get_config_data(overrides)
Expand Down Expand Up @@ -160,7 +151,6 @@ def test_multi_file_configuration(tmp_path: Path):
assert maj_vers_path.read_text() == "2"
assert readme_path.read_text() == "MyAwesomeSoftware(TM) v2.0"
assert build_num_path.read_text() == "2.0.1+jane+38945"
assert csv_path.read_text() == "1;2;0;1;jane;38945"


def test_issue_14(tmp_path: Path):
Expand Down

0 comments on commit da7544f

Please sign in to comment.