Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FQTN displayed as "Non | demo-tests/test_1.py::test_5_marked_SKIP" for demo test #70

Closed
jeffwright13 opened this issue Sep 17, 2022 · 2 comments
Assignees

Comments

@jeffwright13
Copy link
Owner

jeffwright13 commented Sep 17, 2022

No start_time assigned to this test somehow?

Test 'test_1.py::test_5_marked_SKIP' source code:

@pytest.mark.skip
def test_5_marked_SKIP(log_testname):
    logger.critical(fake_data())
    logger.error(fake_data())
    logger.warning(fake_data())
    logger.info(fake_data())
    logger.debug(fake_data())
    assert 1

TuiTestResult object for this test:

TuiTestResult(fqtn='demo-tests/test_1.py::test_5_marked_SKIP', outcome='SKIPPED', start_time=None, duration=0.0006051778327673674, caplog='', capstderr='', capstdout='', longreprtext="('/Users/jwr003/coding/pytest-tui/demo-tests/test_1.py', 187, 'Skipped: unconditional skip')\n").to_dict()

As a dictionary:

{'fqtn': 'demo-tests/test_1.py...arked_SKIP', 'outcome': 'SKIPPED', 'start_time': None, 'duration': 0.0006051778327673674, 'caplog': '', 'capstderr': '', 'capstdout': '', 'longreprtext': "(...)\n"}
special variables
function variables
'fqtn': 'demo-tests/test_1.py::test_5_marked_SKIP'
'outcome': 'SKIPPED'
'start_time': None
'duration': 0.0006051778327673674
'caplog': ''
'capstderr': ''
'capstdout': ''
'longreprtext': "('/Users/jwr003/coding/pytest-tui/demo-tests/test_1.py', 187, 'Skipped: unconditional skip')\n"
len(): 8
@jeffwright13 jeffwright13 self-assigned this Sep 17, 2022
@jeffwright13
Copy link
Owner Author

Apparently, pytest_runtest_setup doesn't even get called for this test (which is where the start_time values gets populated). It has to be because of the @pytest.mark.skip marker. This is the only test in the suite that has that marker, and it's the only one skipping the start-time-populating code.

@jeffwright13 jeffwright13 changed the title FWTN displayed as "Non | demo-tests/test_1.py::test_5_marked_SKIP" for demo test FQTN displayed as "Non | demo-tests/test_1.py::test_5_marked_SKIP" for demo test Sep 17, 2022
@jeffwright13
Copy link
Owner Author

Fixed in 1.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant