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

Cache hash changes during testing #294

Open
RyanMarten opened this issue Dec 29, 2024 · 0 comments
Open

Cache hash changes during testing #294

RyanMarten opened this issue Dec 29, 2024 · 0 comments

Comments

@RyanMarten
Copy link
Contributor

In test_examples.py

@pytest.mark.integration
@pytest.mark.parametrize("script_path", get_example_scripts())
@pytest.mark.cache_dir(
    lambda script_path: os.path.expanduser(f"~/.cache/curator-tests/{Path(script_path).stem}")
)
@pytest.mark.dependency(depends=["first_run_{script_path}"])
def test_example_script_cached_run(script_path, monkeypatch, tmp_path):
    """Test that all example scripts can run without error (second run, using cache)."""
    print(f"\n\n====== RUNNING CACHED RUN of {script_path} ======\n\n")
    _run_example_script(script_path, monkeypatch, tmp_path)

This results in a different cache from those created in test_example_script_first_run, resulting in no cache hit

@RyanMarten RyanMarten added bug Something isn't working low priority bug and removed bug Something isn't working labels Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant