You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is probably a problem in Hypothesis, of unclear age. I'm not planning to work on this immediately, because Python 3.13 is still in beta and we explicitly don't warrant that Hypothesis is threadsafe. (why this test? we accept patches, and we're testing overachievers)
_____________ test_drawing_from_recursive_strategy_is_thread_safe ______________
Traceback (most recent call last):
...
pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-4 (test)
Traceback (most recent call last):
File "python3.13/threading.py", line 1039, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "python3.13/threading.py", line 990, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "hypothesis-python/tests/nocover/test_recursive.py", line 140, in test
database=None, deadline=None, suppress_health_check=[HealthCheck.too_slow]
^^^
File "hypothesis/core.py", line 1638, in wrapped_test
raise the_error_hypothesis_found
File "hypothesis/core.py", line 1605, in wrapped_test
state.run_engine()
~~~~~~~~~~~~~~~~^^
File "hypothesis/core.py", line 1133, in run_engine
runner.run()
~~~~~~~~~~^^
File "hypothesis/internal/conjecture/engine.py", line 693, in run
self._run()
~~~~~~~~~^^
File "hypothesis/internal/conjecture/engine.py", line 1145, in _run
self.generate_new_examples()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "hypothesis/internal/conjecture/engine.py", line 987, in generate_new_examples
self.generate_mutations_from(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "hypothesis/internal/conjecture/engine.py", line 1059, in generate_mutations_from
new_data =self.cached_test_function(
data.buffer[: ex1.start]
...<8 lines>...
extend=BUFFER_SIZE,
)
File "hypothesis/internal/conjecture/engine.py", line 1367, in cached_test_function
self.tree.simulate_test_function(dummy_data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "hypothesis/internal/conjecture/datatree.py", line 880, in simulate_test_function
v = draw(node.transition.ir_type, node.transition.kwargs)
File "hypothesis/internal/conjecture/datatree.py", line 851, in draw
value = draw_func(**kwargs, forced=forced)
File "hypothesis/internal/conjecture/data.py", line 2093, in draw_integer
value =self.provider.draw_integer(
**kwargs, forced=forced, fake_forced=fake_forced
)
File "hypothesis/internal/conjecture/data.py", line 1435, in draw_integer
returnself._draw_unbounded_integer(forced=forced, fake_forced=fake_forced)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "hypothesis/internal/conjecture/data.py", line 1682, in _draw_unbounded_integer
INT_SIZES_SAMPLER.sample(self._cd, forced=forced_i, fake_forced=fake_forced)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "hypothesis/internal/conjecture/utils.py", line 200, in sample
use_alternate = data.draw_boolean(
alternate_chance,
...<2 lines>...
observe=self.observe,
)
File "hypothesis/internal/conjecture/data.py", line 2261, in draw_boolean
kwargs: BooleanKWargs =self._pooled_kwargs("boolean", {"p": p})
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "hypothesis/internal/conjecture/data.py", line 2300, in _pooled_kwargs
returnPOOLED_KWARGS_CACHE[key]
~~~~~~~~~~~~~~~~~~~^^^^^
File "hypothesis/internal/cache.py", line 79, in__getitem__self.__balance(i)
~~~~~~~~~~~~~~^^^
File "hypothesis/internal/cache.py", line 218, in __balance
self.__swap(i, j)
~~~~~~~~~~~^^^^^^
File "hypothesis/internal/cache.py", line 193, in __swap
assertself.data[j].sort_key <self.data[i].sort_key
AssertionError: assert (0, [2, 1482408]) < (0, [2, 1482362])
+ where (0, [2, 1482408]) = Entry(key=('boolean', ('p', 0.6171875)), value={'p': 0.6171875}, score=[2, 1482408], pins=0).sort_key
+ and (0, [2, 1482362]) = Entry(key=('boolean', ('p', 0.0)), value={'p': 0.0}, score=[2, 1482362], pins=0).sort_key
The text was updated successfully, but these errors were encountered:
This is probably a problem in Hypothesis, of unclear age. I'm not planning to work on this immediately, because Python 3.13 is still in beta and we explicitly don't warrant that Hypothesis is threadsafe. (why this test? we accept patches, and we're testing overachievers)
The text was updated successfully, but these errors were encountered: