Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests depend on custom target #41

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlexTereshenkov
Copy link
Owner

@AlexTereshenkov AlexTereshenkov commented Apr 18, 2024

Repro: modifying file contents of a custom target that owns that file doesn't cause the test to re-run and uses the local cache.

❯ pants test tests/cli                                                                                               
17:15:30.50 [INFO] Completed: Run Pytest - tests/cli/test_cli.py:tests - succeeded.

✓ tests/cli/test_cli.py:tests succeeded in 0.21s (memoized).

❯ echo "0.0.2" > cheeseshop/VERSION

❯ pants test tests/cli
17:15:59.80 [INFO] Completed: Run Pytest - tests/cli/test_cli.py:tests - succeeded.

✓ tests/cli/test_cli.py:tests succeeded in 0.21s (memoized).

❯ echo "11223344" > cheeseshop/VERSION

fedora in ~/code/cheeseshop-query on  caching/custom-targets [$!?] via 🐍 v3.11.3 (.venv) 
❯ pants test tests/cli
17:16:17.02 [INFO] Completed: Run Pytest - tests/cli/test_cli.py:tests - succeeded.

✓ tests/cli/test_cli.py:tests succeeded in 0.21s (memoized).

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.

1 participant