|
83 | 83 | is_typed_named_tuple,
|
84 | 84 | )
|
85 | 85 | from hypothesis.internal.conjecture.utils import calc_label_from_cls, check_sample
|
86 |
| -from hypothesis.internal.coverage import IN_COVERAGE_TESTS, description_stack |
87 | 86 | from hypothesis.internal.entropy import get_seeder_and_restorer
|
88 | 87 | from hypothesis.internal.floats import float_of
|
89 | 88 | from hypothesis.internal.observability import TESTCASE_CALLBACKS
|
@@ -1758,22 +1757,8 @@ def __init__(self, definition, args, kwargs):
|
1758 | 1757 | self.args = args
|
1759 | 1758 | self.kwargs = kwargs
|
1760 | 1759 |
|
1761 |
| - if IN_COVERAGE_TESTS: |
1762 |
| - # We do a bit of a dance here to ensure that whatever 'outer' description |
1763 |
| - # stack we might have, doesn't affect the validation code internal to the |
1764 |
| - # strategy we're drawing from. Otherwise, we'd get flaky fails like #3968. |
1765 |
| - def do_draw(self, data): |
1766 |
| - prev = description_stack[:] |
1767 |
| - try: |
1768 |
| - description_stack.clear() |
1769 |
| - return self.definition(data.draw, *self.args, **self.kwargs) |
1770 |
| - finally: |
1771 |
| - description_stack[:] = prev |
1772 |
| - |
1773 |
| - else: # pragma: no cover |
1774 |
| - |
1775 |
| - def do_draw(self, data): |
1776 |
| - return self.definition(data.draw, *self.args, **self.kwargs) |
| 1760 | + def do_draw(self, data): |
| 1761 | + return self.definition(data.draw, *self.args, **self.kwargs) |
1777 | 1762 |
|
1778 | 1763 | def calc_label(self):
|
1779 | 1764 | return calc_label_from_cls(self.definition)
|
|
0 commit comments