diff --git a/tests/test_hooks/test_run_command.py b/tests/test_hooks/test_run_command.py index 0f03d798..58f60cd0 100644 --- a/tests/test_hooks/test_run_command.py +++ b/tests/test_hooks/test_run_command.py @@ -1,4 +1,5 @@ import subprocess +import sys import pytest @@ -16,7 +17,8 @@ def test_runs_a_str_command(self): def test_can_access_env(self): """The command can access custom environment variables.""" - result = run_command("echo $TEST_ENV", environment={"TEST_ENV": "Hello"}) + cmd = "echo %TEST_ENV%" if sys.platform == "win32" else "echo $TEST_ENV" + result = run_command(cmd, environment={"TEST_ENV": "Hello"}) assert isinstance(result, subprocess.CompletedProcess) assert result.stdout == "Hello\n" diff --git a/tests/test_hooks/test_run_setup_hooks.py b/tests/test_hooks/test_run_hook_suites.py similarity index 98% rename from tests/test_hooks/test_run_setup_hooks.py rename to tests/test_hooks/test_run_hook_suites.py index 8202f1bf..17667edf 100644 --- a/tests/test_hooks/test_run_setup_hooks.py +++ b/tests/test_hooks/test_run_hook_suites.py @@ -4,7 +4,6 @@ import pytest from pytest import param from bumpversion.hooks import run_setup_hooks, run_pre_commit_hooks, run_post_commit_hooks -from bumpversion.versioning.models import Version from tests.conftest import get_config_data, get_semver