Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pytest.fail() does not fail on a dashboard #1196

webmoskal started this conversation in General
Discussion options

pytest.fail() fails for pytest and fails on report.html, but displayed as passed on a dashboard

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

@webmoskal I wasn't able to reproduce. Can you try using self.fail() instead and see if you get the correct results?

You must be logged in to vote
2 replies
Comment options

E AttributeError: 'TestLogin' object has no attribute 'fail'

@pytest.mark.usefixtures("sb")
class TestLogin():
 def test_fail(self):
 self.fail()
Comment options

Use sb.fail() when using the SeleniumBase fixture format:

# "sb" pytest fixture test in a method with no class
def test_sb_fixture_with_no_class(sb):
 sb.fail()
# "sb" pytest fixture test in a method inside a class
class Test_SB_Fixture:
 def test_sb_fixture_inside_class(self, sb):
 sb.fail()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /