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

syrupy is incompatible with pytest-flakefinder #771

Open
jrandolf-2 opened this issue Jul 14, 2023 · 1 comment
Open

syrupy is incompatible with pytest-flakefinder #771

jrandolf-2 opened this issue Jul 14, 2023 · 1 comment

Comments

@jrandolf-2
Copy link

jrandolf-2 commented Jul 14, 2023

Describe the bug

Can run pytests with flakefinder and syrupy.

To reproduce

Steps to reproduce the behavior:

  1. Create a test with syrupy and update the snapshots
  2. Run pytest test_file.py --flake-finder
  3. See error

Expected behavior

Tests should pass.

Environment (please complete the following information):

  • OS: Any
  • Syrupy Version: [e.g. 1.0] Any
  • Python Version: [e.g. 3.9] Any

Additional context

Syrupy tracks each iteration of a test run by flake finder resulting in a bunch of indexing. A fix would be having a "global name" for the snapshot, one that doesn't rely on the test name (but does rely on the file)

@noahnu
Copy link
Collaborator

noahnu commented Aug 17, 2023

You may be able to work around this by specifying a custom name rather than relying on the default auto-incremented execution id. See the example in the README: https://github.com/tophat/syrupy#name

@noahnu noahnu added this to Syrupy Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants