Skip to content

Fix macOS test failure: use /Users path instead of /home#12

Merged
gb119 merged 2 commits intomainfrom
copilot/fix-macos-failing-tests
Feb 7, 2026
Merged

Fix macOS test failure: use /Users path instead of /home#12
gb119 merged 2 commits intomainfrom
copilot/fix-macos-failing-tests

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

Test test_only_user_defined_not_system fails on macOS because /home/user/... resolves under /var (a system path), unlike Linux where /home contains user directories.

Changes

  • Updated test to use platform-specific non-system paths:
    • macOS: /Users/testuser/my_sensitive_project
    • Linux: /home/user/my_sensitive_project (unchanged)
    • Windows: ~/MySensitiveProject (unchanged)
# Before
if system == "Windows":
    custom_path = os.path.join(os.path.expanduser("~"), "MySensitiveProject")
else:
    custom_path = "/home/user/my_sensitive_project"

# After
if system == "Windows":
    custom_path = os.path.join(os.path.expanduser("~"), "MySensitiveProject")
elif system == "Darwin":
    custom_path = "/Users/testuser/my_sensitive_project"
else:
    custom_path = "/home/user/my_sensitive_project"

On macOS, /home is an automounter directory that may resolve to paths under /var. Since /var is in darwin.py system paths, this caused false positives in system path detection.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/gb119/bad_path/actions/runs/21784719479
    • Triggering command: /usr/bin/curl curl -s REDACTED -H Accept: application/vnd.github+json (http block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: gb119 <4428426+gb119@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing tests for MacOS and propose solution Fix macOS test failure: use /Users path instead of /home Feb 7, 2026
Copilot AI requested a review from gb119 February 7, 2026 18:26
@gb119 gb119 marked this pull request as ready for review February 7, 2026 18:28
@gb119 gb119 merged commit b8f41ed into main Feb 7, 2026
@gb119 gb119 deleted the copilot/fix-macos-failing-tests branch February 7, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants