Skip to content

Commit 0a4fa56

Browse files
committed
Work around Pyodide (?) bug
1 parent b821528 commit 0a4fa56

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hypothesis-python/src/hypothesis/internal/reflection.py

+2
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ def extract_lambda_source(f):
276276
source = LINE_CONTINUATION.sub(" ", source)
277277
source = WHITESPACE.sub(" ", source)
278278
source = source.strip()
279+
if "lambda" not in source and sys.platform == "emscripten": # pragma: no cover
280+
return if_confused # work around Pyodide bug in inspect.getsource()
279281
assert "lambda" in source
280282

281283
tree = None

0 commit comments

Comments
 (0)