We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e5af01 commit d4ee749Copy full SHA for d4ee749
examples/timeout_test.py
@@ -0,0 +1,15 @@
1
+""" This test fails on purpose to demonstrate the timeout feature
2
+ for tests that run longer than the time limit specified. """
3
+
4
+import pytest
5
+import time
6
+from seleniumbase import BaseCase
7
8
9
+class MyTestClass(BaseCase):
10
11
+ @pytest.mark.expected_failure
12
+ @pytest.mark.timeout(6) # The test will fail if it runs longer than this
13
+ def test_timeout_failure(self):
14
+ self.open("https://xkcd.com/1658/")
15
+ time.sleep(7)
0 commit comments