From 35a8333be501b4924bfe568e8d2ea437a3e79821 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 22:29:19 +0000 Subject: [PATCH 1/2] Initial plan From 88abdc03e50635526ef2b6fd92911942c430b99a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 22:40:36 +0000 Subject: [PATCH 2/2] Skip test_bad_commit online variant on CI to avoid flakiness Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/b55d7512-e4ca-4071-a97f-7771fa1e9063 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> --- tests/usethis/_core/test_core_tool.py | 4 ++++ 1 file changed, 4 insertions(+) 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")