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

AssertionError in generate_mutations_from #3990

Closed
wsanchez opened this issue May 14, 2024 · 3 comments
Closed

AssertionError in generate_mutations_from #3990

wsanchez opened this issue May 14, 2024 · 3 comments

Comments

@wsanchez
Copy link

wsanchez commented May 14, 2024

In CI builds, dependabot is trying to upgrade to hypothesis-6.100.8 and getting a new AssertionError:

Traceback (most recent call last):
[918](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:919)
  File "/home/runner/work/ranger-ims-server/ranger-ims-server/.tox/coverage-py312/lib/python3.12/site-packages/ims/store/export/test/test_json.py", line 162, in test_fromIO
[919](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:920)
    def test_fromIO(self, imsDataIn: IMSData) -> None:
[920](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:921)
  File "/home/runner/work/ranger-ims-server/ranger-ims-server/.tox/coverage-py312/lib/python3.12/site-packages/hypothesis/core.py", line 1638, in wrapped_test
[921](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:922)
    raise the_error_hypothesis_found
[922](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:923)
  File "/home/runner/work/ranger-ims-server/ranger-ims-server/.tox/coverage-py312/lib/python3.12/site-packages/hypothesis/core.py", line 1601, in wrapped_test
[923](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:924)
    state.run_engine()
[924](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:925)
  File "/home/runner/work/ranger-ims-server/ranger-ims-server/.tox/coverage-py312/lib/python3.12/site-packages/hypothesis/core.py", line 1133, in run_engine
[925](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:926)
    runner.run()
[926](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:927)
  File "/home/runner/work/ranger-ims-server/ranger-ims-server/.tox/coverage-py312/lib/python3.12/site-packages/hypothesis/internal/conjecture/engine.py", line 693, in run
[927](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:928)
    self._run()
[928](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:929)
  File "/home/runner/work/ranger-ims-server/ranger-ims-server/.tox/coverage-py312/lib/python3.12/site-packages/hypothesis/internal/conjecture/engine.py", line 1142, in _run
[929](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:930)
    self.generate_new_examples()
[930](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:931)
  File "/home/runner/work/ranger-ims-server/ranger-ims-server/.tox/coverage-py312/lib/python3.12/site-packages/hypothesis/internal/conjecture/engine.py", line 987, in generate_new_examples
[931](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:932)
    self.generate_mutations_from(data)
[932](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:933)
  File "/home/runner/work/ranger-ims-server/ranger-ims-server/.tox/coverage-py312/lib/python3.12/site-packages/hypothesis/internal/conjecture/engine.py", line 1075, in generate_mutations_from
[933](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:934)
    assert isinstance(new_data, ConjectureResult)
[934](https://github.com/burningmantech/ranger-ims-server/actions/runs/9057012188/job/24880363816?pr=1202#step:11:935)
builtins.AssertionError:
@wsanchez
Copy link
Author

I'm using @composite strategies, which may be spitting out something invalid, but it's hard to see how to track that down.

The strategy in question here is creating a deeply nested data structure; basically a test database worth of stuff.

@tybug
Copy link
Member

tybug commented May 14, 2024

This should be fixed in #3988 / 6.102.1!

@Zac-HD
Copy link
Member

Zac-HD commented May 15, 2024

Closing because we think it's fixed; if you can repro on the new version we'll reopen 🙂

@Zac-HD Zac-HD closed this as completed May 15, 2024
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

No branches or pull requests

3 participants