We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99a140f commit 30b2a2dCopy full SHA for 30b2a2d
mypy/test/data.py
@@ -314,6 +314,19 @@ def runtest(self) -> None:
314
# TODO: add a better error message for when someone uses skip and xfail at the same time
315
elif self.xfail:
316
self.add_marker(pytest.mark.xfail)
317
+
318
+ if (
319
+ not [line for line in self.input if line.strip()]
320
+ and "Empty" not in self.name
321
+ and not [
322
+ file
323
+ for file in self.files
324
+ # these files are added based on other things
325
+ if os.path.basename(file[0]) not in ("typing.pyi", "_typeshed.pyi", "builtins.pyi")
326
+ ]
327
+ ):
328
+ raise AssertionError(f"{self.name} is empty.")
329
330
parent = self.getparent(DataSuiteCollector)
331
assert parent is not None, "Should not happen"
332
suite = parent.obj()
0 commit comments