Giter VIP home page Giter VIP logo

Comments (5)

bluetech avatar bluetech commented on May 27, 2024

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.

guoguojenna avatar guoguojenna commented on May 27, 2024

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.

bluetech avatar bluetech commented on May 27, 2024

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.

github-actions avatar github-actions commented on May 27, 2024

This issue is stale because it has been open for 14 days with no activity.

from pytest.

The-Compiler avatar The-Compiler commented on May 27, 2024

Closing as not a pytest issue.

from pytest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.