MCPcopy
hub / github.com/scrapy/scrapy / printSummary

Method printSummary

scrapy/commands/check.py:17–42  ·  view source on GitHub ↗
(self, start: float, stop: float)

Source from the content-addressed store, hash-verified

15
16class TextTestResult(_TextTestResult):
17 def printSummary(self, start: float, stop: float) -> None:
18 write = self.stream.write
19 writeln = self.stream.writeln
20
21 run = self.testsRun
22 plural = "s" if run != 1 else ""
23
24 writeln(self.separator2)
25 writeln(f"Ran {run} contract{plural} in {stop - start:.3f}s")
26 writeln()
27
28 infos = []
29 if not self.wasSuccessful():
30 write("FAILED")
31 failed, errored = map(len, (self.failures, self.errors))
32 if failed:
33 infos.append(f"failures={failed}")
34 if errored:
35 infos.append(f"errors={errored}")
36 else:
37 write("OK")
38
39 if infos:
40 writeln(f" ({', '.join(infos)})")
41 else:
42 write("\n")
43
44
45class Command(ScrapyCommand):

Calls 1

joinMethod · 0.45