MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_runner_factory

Function test_runner_factory

python/python3/tornado/test/runtests.py:61–80  ·  view source on GitHub ↗
(stderr)

Source from the content-addressed store, hash-verified

59
60
61def test_runner_factory(stderr):
62 class TornadoTextTestRunner(unittest.TextTestRunner):
63 def __init__(self, *args, **kwargs):
64 kwargs["stream"] = stderr
65 super().__init__(*args, **kwargs)
66
67 def run(self, test):
68 result = super().run(test)
69 if result.skipped:
70 skip_reasons = set(reason for (test, reason) in result.skipped)
71 self.stream.write( # type: ignore
72 textwrap.fill(
73 "Some tests were skipped because: %s"
74 % ", ".join(sorted(skip_reasons))
75 )
76 )
77 self.stream.write("\n") # type: ignore
78 return result
79
80 return TornadoTextTestRunner
81
82
83class LogCounter(logging.Filter):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected