File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
4
4
def test_simple_cases (testdir ):
5
- """ Verify a simple passing test and a simple failing test. """
5
+ """ Verify a simple passing test and a simple failing test.
6
+ The failing test is marked as xfail to have it skipped. """
6
7
testdir .makepyfile (
7
8
"""
9
+ import pytest
8
10
from seleniumbase import BaseCase
9
11
class MyTestCase(BaseCase):
10
12
def test_passing(self):
11
13
self.assert_equal('yes', 'yes')
14
+ @pytest.mark.xfail
12
15
def test_failing(self):
13
16
self.assert_equal('yes', 'no')
14
17
"""
15
18
)
16
19
result = testdir .inline_run ("--headless" , "--rs" )
17
20
assert result .matchreport ("test_passing" ).passed
18
- assert result .matchreport ("test_failing" ).failed
21
+ assert result .matchreport ("test_failing" ).skipped
19
22
20
23
21
24
def test_basecase (testdir ):
You can’t perform that action at this time.
0 commit comments