Skip to content

Commit b0b3231

Browse files
committed
fix: Internal error in stateful tests
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
1 parent 18a1fd4 commit b0b3231

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

docs/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Changelog
44
:version:`Unreleased <v3.33.1...HEAD>` - TBD
55
--------------------------------------------
66

7+
**Fixed**
8+
9+
- Internal error in stateful testing.
10+
711
.. _v3.33.1:
812

913
:version:`3.33.1 <v3.33.0...v3.33.1>` - 2024-07-22

src/schemathesis/stateful/runner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from typing import TYPE_CHECKING, Any, Generator, Iterator, Type
88

99
import hypothesis
10+
from hypothesis.stateful import Rule
1011
import requests
1112
from hypothesis.control import current_build_context
1213
from hypothesis.errors import Flaky
@@ -139,6 +140,9 @@ def setup(self) -> None:
139140
def get_call_kwargs(self, case: Case) -> dict[str, Any]:
140141
return call_kwargs
141142

143+
def _repr_step(self, rule: Rule, data: dict, result: StepResult) -> str:
144+
return ""
145+
142146
if config.override is not None:
143147

144148
def before_call(self, case: Case) -> None:

src/schemathesis/stateful/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def _on_passed(_name: str, _case: Case) -> None:
5858
)
5959
check_results.append(passed_check)
6060

61-
for check in checks + additional_checks:
61+
for check in tuple(checks) + tuple(additional_checks):
6262
name = check.__name__
6363
copied_case = case.partial_deepcopy()
6464
try:

0 commit comments

Comments
 (0)