question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Manually trigger an xpass

See original GitHub issue

I’ve got a large number of dynamically generated tests, and I’d like to be able to trigger an xpass inside the test, just like I can call pytest.fail() and pytest.xfail(). But pytest.xpass() doesn’t seem to exist

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
RonnyPfannschmidtcommented, Nov 29, 2019

an expected failure is to be marked as xfail, the xpass will then automatically happen

fail/xfail raise exceptions, its fundamentally impossible to make a symmetric equivalent for pass/xpass

1reaction
graingertcommented, Nov 29, 2019

I’m assuming “known_fails” is known at collect time:

@pytest.mark.parametrize(
    'path',
    [
        pytest.param(
            path, marks=pytest.mark.xfail if path in known_fails else None
        )
        for path in get_valid_files()
    ]
)
def test_valid_file(path):
    ...
Read more comments on GitHub >

github_iconTop Results From Across the Web

XPass 2 INSTALLATION GUIDE
Do not install the product in a place with direct sunlight, moisture, dust, or soot. • A fire or electric shock may occur....
Read more >
FAQ - XPASS
XPASS gives you access to premium fitness studios in your area. Learn more about how XPASS works and get your questions answered.
Read more >
Xpass User Guide - Yumpu
Initialization of network settingWhen you install the Xpass or forget the network setting's value of Xpass in use, can initialthe network ...
Read more >
Usage and Invocations — pytest documentation
One can also manually access the exception information, for example: ... pytest --trace. This will invoke the Python debugger at the start of...
Read more >
19802-001-F-LTV-1200-and-1150-Ops-Manual.pdf - AARC
Breaths may be initiated by a patient trigger, a push of the Manual Breath button, or by the ventilator based on the set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found