New issue 2238: Mysterious test failure in Hypothesis build only on pypy
https://bitbucket.org/pypy/pypy/issues/2238/mysterious-test-failure-in-hypothesis

David MacIver:

This is currently a somewhat speculative issue. Please don't spend too much 
time on it until I've been able to narrow it down further.

This test is failing for me on travis only on pypy: 
https://github.com/DRMacIver/hypothesis/blob/5095266f0fb88bdc17c10753499a57d3163b7596/tests/cover/test_conjecture_engine.py#L286

(The test that should be at that line number is test_interleaving_engines)

It did not fail on pypy 2.6.1 and started failing when I upgraded pypy to 
4.0.1. I don't currently have a 4.0.1 locally installed and my internet is 
rather unusably slow right now so I haven't yet been able to confirm this 
locally, but it happens reliably on travis.

The failure I see is:

```
tests/cover/test_conjecture_engine.py:285: in test_interleaving_engines
.tox/pypy-full/site-packages/hypothesis/core.py:492: in wrapped_test
.tox/pypy-full/site-packages/hypothesis/executors.py:57: in 
default_new_style_executor
.tox/pypy-full/site-packages/hypothesis/core.py:115: in run
tests/cover/test_conjecture_engine.py:287: in test_interleaving_engines
tests/cover/test_conjecture_engine.py:38: in run_to_buffer
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/engine.py:154: in 
run
self._run()
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/engine.py:382: in 
_run
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/minimizer.py:138: 
in minimize
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/minimizer.py:106: 
in run
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/minimizer.py:74: in 
_shrink_index
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/minimizer.py:61: in 
incorporate
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/engine.py:381: in 
<lambda>
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/engine.py:136: in 
incorporate_new_buffer
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/engine.py:65: in 
test_function
tests/cover/test_conjecture_engine.py:302: in x
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/data.py:147: in 
mark_interesting
.tox/pypy-full/site-packages/hypothesis/internal/conjecture/data.py:74: in 
__assert_not_frozen

E   Frozen: Cannot call mark_interesting on frozen TestData
```


Which is a legitimate error, but I can't see how it could be reachable here: It 
means the frozen flag has been set before this, but the only places where the 
frozen flag is set should either happen after this point or would have raised 
an exception that should not have been caught prior to here.

I'm not ruling out that this is just a bug in my code, but the fact that it 
only occurs on a specific pypy version suggests not.

Current smallest reproduction I know of:

* Clone hypothesis
* Check out 5095266f0fb88bdc17c10753499a57d3163b7596
* make check-pypy

The following will *probably* reproduce it but I can't currently be sure of 
that:

* On pypy-4.0.1 install pytest
* Run PYTHONPATH=src python -m pytest tests/cover/test_conjecture_engine.py 
-kinterleaving

I'll try to get you a more minimal example later if this is hard for you to 
reproduce.

Let me know if you need anything else.


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to