diff --git a/tests/usethis/_core/test_core_tool.py b/tests/usethis/_core/test_core_tool.py index 776b8665..5291b000 100644 --- a/tests/usethis/_core/test_core_tool.py +++ b/tests/usethis/_core/test_core_tool.py @@ -1,3 +1,4 @@ +import os import subprocess import unittest import unittest.mock @@ -1890,6 +1891,9 @@ def test_config_file_already_exists(self, uv_init_repo_dir: Path): def test_bad_commit(self, uv_env_dir: Path, git_path: Path): # This needs a venv so that we can actually run pre-commit via git + if os.environ.get("CI") and not usethis_config.offline: + pytest.skip("Skipping online test on CI to avoid flakiness") + # Arrange (uv_env_dir / ".gitignore").write_text(".venv/\n")