Skip to content

Commit f1c6b2a

Browse files
test(gitleaks): use .venv/bin/tox (uv creates .venv)
1 parent b683927 commit f1c6b2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_gitleaks_precommit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_gitleaks_stable_patterns_fail(tmp_path: Path, fname: str, content: str)
2828
run("git add -A") # pre-commit's gitleaks scans the staged index
2929

3030
with pytest.raises(AssertionError, match=r"(?i)(leak|gitleaks|secret)"):
31-
run("./venv/bin/tox -e pre-commit")
31+
run(".venv/bin/tox -e pre-commit")
3232

3333

3434
# --- Sealed-secrets: YAML/YML allowlisted; non-YAML should be flagged ---
@@ -84,7 +84,7 @@ def test_gitleaks_yaml_allowlist_for_sealed_secrets_yaml(tmp_path: Path):
8484
run_yaml = make_venv(proj_yaml)
8585
(proj_yaml / "secret.yaml").write_text(sealed_yaml)
8686
run_yaml("git add -A")
87-
run_yaml("./venv/bin/tox -e pre-commit")
87+
run_yaml(".venv/bin/tox -e pre-commit")
8888

8989

9090
def test_gitleaks_yaml_allowlist_for_sealed_secrets_yml(tmp_path: Path):
@@ -110,7 +110,7 @@ def test_gitleaks_yaml_allowlist_for_sealed_secrets_yml(tmp_path: Path):
110110
run_yml = make_venv(proj_yml)
111111
(proj_yml / "secret.yml").write_text(sealed_yaml)
112112
run_yml("git add -A")
113-
run_yml("./venv/bin/tox -e pre-commit")
113+
run_yml(".venv/bin/tox -e pre-commit")
114114

115115

116116
def test_leaky_code_fails_gitleaks(tmp_path: Path):
@@ -126,4 +126,4 @@ def test_leaky_code_fails_gitleaks(tmp_path: Path):
126126
(proj_code / "leaky.py").write_text(f'api_key = "{blob}"\n')
127127
run_code("git add -A")
128128
with pytest.raises(AssertionError, match=r"(?i)(leak|gitleaks|secret)"):
129-
run_code("./venv/bin/tox -e pre-commit")
129+
run_code(".venv/bin/tox -e pre-commit")

0 commit comments

Comments
 (0)