Files
app-store-optimization/skills/loki-mode/benchmarks/results/2026-01-05-10-37-54/swebench-loki-patches/pytest-dev__pytest-11143.patch

17 lines
590 B
Diff

# pytest-dev__pytest-11143
# Loki Mode Multi-Agent Patch
# Attempts: 1
--- a/src/_pytest/assertion/rewrite.py
+++ b/src/_pytest/assertion/rewrite.py
@@ -757,7 +757,9 @@ class AssertionRewriter(ast.NodeVisitor):
return not isinstance(node.value, ast.Constant)
def is_rewrite_disabled(self, docstring: str) -> bool:
- return "PYTEST_DONT_REWRITE" in docstring
+ if isinstance(docstring, str):
+ return "PYTEST_DONT_REWRITE" in docstring
+ return False
def variable(self) -> str:
name = "@py_assert" + str(self.variable_counter)