Skip to content

Commit 345134e

Browse files
authored
Fix erorrs in self-check related to pytest (python#8418)
1 parent 6efbff4 commit 345134e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mypy/test/data.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ class DataDrivenTestCase(pytest.Item): # type: ignore # inheriting from Any
181181
# forward vs backward slashes in file paths for Windows vs Linux.
182182
normalize_output = True
183183

184+
# Extra attributes used by some tests.
185+
lastline = None # type: int
186+
output_files = None # type: List[Tuple[str, str]] # Path and contents for output files
187+
deleted_paths = None # type: Dict[int, Set[str]] # Mapping run number -> paths
188+
triggered = None # type: List[str] # Active triggers (one line per incremental step)
189+
184190
def __init__(self,
185191
parent: 'DataSuiteCollector',
186192
suite: 'DataSuite',
@@ -252,7 +258,7 @@ def teardown(self) -> None:
252258
def reportinfo(self) -> Tuple[str, int, str]:
253259
return self.file, self.line, self.name
254260

255-
def repr_failure(self, excinfo: Any) -> str:
261+
def repr_failure(self, excinfo: Any, style: Optional[Any] = None) -> str:
256262
if excinfo.errisinstance(SystemExit):
257263
# We assume that before doing exit() (which raises SystemExit) we've printed
258264
# enough context about what happened so that a stack trace is not useful.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy