Skip to content

Commit

Permalink
test: unit: gomod: test_get_gomod_version: Rename test ids
Browse files Browse the repository at this point in the history
Previous commit factored out the version string regex we use for both
the 'go' and 'toolchain' lines in go.mod. Now it makes sense to adjust
the test IDs to hint at what line we're actually testing and in turn it
will also allow us to drop some toolchain test or not having to
introduce one at all based on code re-use.

Signed-off-by: Erik Skultety <[email protected]>
  • Loading branch information
eskultety committed Jul 22, 2024
1 parent 2d73881 commit 0424eb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/package_managers/test_gomod.py
Original file line number Diff line number Diff line change
Expand Up @@ -1927,9 +1927,9 @@ def test_fetch_tags_fail(repo_remote_with_tag: tuple[RootedPath, RootedPath]) ->
@pytest.mark.parametrize(
"go_mod_file, go_mod_version, go_toolchain_version",
[
pytest.param("go 1.21", "1.21", None, id="no_toolchain"),
pytest.param(" go 1.21.4 ", "1.21.4", None, id="whitechars_no_toolchain"),
pytest.param(" toolchain go1.21.4 ", None, "1.21.4", id="whitechars_toolchain"),
pytest.param("go 1.21", "1.21", None, id="go_minor"),
pytest.param(" go 1.21.4 ", "1.21.4", None, id="go_spaces"),
pytest.param(" toolchain go1.21.4 ", None, "1.21.4", id="toolchain_spaces"),
pytest.param("go 1.21\ntoolchain go1.21.6", "1.21", "1.21.6", id="go_and_toolchain"),
],
indirect=["go_mod_file"],
Expand Down

0 comments on commit 0424eb5

Please sign in to comment.