mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
Compare commits
2 Commits
1.5.0
...
shiftrenam
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbbcf3cbca | ||
|
|
d2af9df8f9 |
@@ -18,6 +18,9 @@ def pytest_addoption(parser):
|
|||||||
|
|
||||||
def pytest_configure(config):
|
def pytest_configure(config):
|
||||||
config._benchresults = {}
|
config._benchresults = {}
|
||||||
|
config.addinivalue_line(
|
||||||
|
"markers", "slow: mark test to require --slow option to run"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def pytest_runtest_setup(item):
|
def pytest_runtest_setup(item):
|
||||||
@@ -79,6 +82,9 @@ def benchmark(request):
|
|||||||
def pytest_terminal_summary(terminalreporter):
|
def pytest_terminal_summary(terminalreporter):
|
||||||
tr = terminalreporter
|
tr = terminalreporter
|
||||||
results = tr.config._benchresults
|
results = tr.config._benchresults
|
||||||
|
if not results:
|
||||||
|
return
|
||||||
|
|
||||||
tr.section("benchmark results")
|
tr.section("benchmark results")
|
||||||
float_names = 'median min max'.split()
|
float_names = 'median min max'.split()
|
||||||
width = max(map(len, float_names))
|
width = max(map(len, float_names))
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
[pytest]
|
[pytest]
|
||||||
addopts = -vrsx --strict-markers
|
addopts = -vrsx --strict-markers
|
||||||
markers = slow: mark test as slow (requires --slow option to run)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user