Skip to content

Commit e412f1e

Browse files
committed
Update the unit tests
1 parent b2a9d6c commit e412f1e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/unit_tests/verify_framework.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@
22

33

44
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. """
67
testdir.makepyfile(
78
"""
9+
import pytest
810
from seleniumbase import BaseCase
911
class MyTestCase(BaseCase):
1012
def test_passing(self):
1113
self.assert_equal('yes', 'yes')
14+
@pytest.mark.xfail
1215
def test_failing(self):
1316
self.assert_equal('yes', 'no')
1417
"""
1518
)
1619
result = testdir.inline_run("--headless", "--rs")
1720
assert result.matchreport("test_passing").passed
18-
assert result.matchreport("test_failing").failed
21+
assert result.matchreport("test_failing").skipped
1922

2023

2124
def test_basecase(testdir):

0 commit comments

Comments
 (0)