Comments (5)
We will need to see the code for "/var/tmp/tmt/run-107/plans/rdma/sriov/sriov/discover/sriov-test-suite/tests/tests/conftest.py", line 56, in pytest_terminal_summary
.
from pytest.
We will need to see the code for
"/var/tmp/tmt/run-107/plans/rdma/sriov/sriov/discover/sriov-test-suite/tests/tests/conftest.py", line 56, in pytest_terminal_summary
.
Thank you checking this. Here is piece of conftest.py. There's no this issue when skipping individual test case.
44 def pytest_terminal_summary(terminalreporter) -> None: # noqa: ANN001
45 """Generate TMT-compatible custom results.json."""
46 results = []
47 for report in (
48 terminalreporter.stats.get('passed', [])
49 + terminalreporter.stats.get('failed', [])
50 + terminalreporter.stats.get('xfailed', [])
51 + terminalreporter.stats.get('xpassed', [])
52 + terminalreporter.stats.get('skipped', [])
53 ):
54 name = report.location[-1]
55 status = map_outcome(report.outcome)
56 duration = time.strftime('%H:%M:%S', time.gmtime(report.duration))
57
58 result = CustomResults(
59 name=f'/{name}',
60 result=status,
61 duration=duration,
62 ids=None,
63 serialnumber=None,
64 guest=None,
65 note=None,
66 log=None,
67 )
68
Here is the whole file: https://gitlab.com/rh-kernel-stqe/sts/-/blob/1ed9a5c658fc8e891c05c52551b66848fe4db78e/tests/conftest.py
from pytest.
There are two types of reports, TestReport and CollectReport. The duration
field is only present on TestReport
. When you skip during collection time, you get a CollectReport
in the terminal reporter stats, which fails when you access report.duration
.
from pytest.
This issue is stale because it has been open for 14 days with no activity.
from pytest.
Closing as not a pytest issue.
from pytest.
Related Issues (20)
- 8.1.1 raises exception if `boto` is imported in environment HOT 3
- Pytest-watch with coverage (If not existent) HOT 1
- List of disabled plugins is not passed down to `runpytest()`
- Sporadically encountering SyntaxError HOT 7
- No output written to JUnit XML files
- AttributeError with import-mode importlib and doctest modules HOT 7
- log-disable as pytest.ini configuration option does not have any effect HOT 3
- Pytest keeps reference to attributes of failed test cases for too long HOT 4
- Conditional test parametrization HOT 3
- tmp_path_factory documentation has circular links HOT 3
- Pytest does not capture teardown logs if a fixture throws an exception
- ExceptionGroup traceback of session fixture unlimitedly grows from test to test HOT 1
- Missing `py.process` HOT 2
- 8.2.0 release planning
- Adding parameterized fixture in pytest_generate_test is not executing the fixture's code, even if it is marked as "indirect"
- setUpModule/tearDownModule not invoked HOT 4
- junit-xml output attribute can be too big to handle with -vv
- More granular scripting interface HOT 4
- support an alternate syntax for "not" (as in `pytest -m "not stuff"`) HOT 6
- Documentation request: types/shapes of options in `[tool.pytest.ini_options]` HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest.