Skip to content

Commit 8b47eee

Browse files
committed
test: add step time
1 parent 781a08a commit 8b47eee

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,56 @@
1+
import time
2+
13
import allure
24
import pytest
35

46

57
def test_passed():
8+
time.sleep(1)
69
assert True
710

811

912
@pytest.mark.skip(reason="This test is skipped")
1013
def test_skipped():
14+
time.sleep(2)
1115
assert True
1216

1317

1418
def test_broken():
19+
time.sleep(3)
1520
raise Exception("This test is broken")
1621

1722

1823
@allure.title("This is a step failed_fixture")
1924
@pytest.fixture(scope="function")
2025
def setup_failed_fixture():
26+
time.sleep(4)
2127
raise Exception("This fixture is broken")
2228

2329

2430
@allure.title("This test fixture setup is broken")
2531
def test_failed_fixture_setup(failed_fixture):
2632
with allure.step("This is a step"):
27-
assert True
33+
time.sleep(5)
34+
assert failed_fixture
2835

2936

3037
@allure.title("This is a step teardown_fixture")
3138
@pytest.fixture(scope="function")
3239
def teardown_fixture():
40+
time.sleep(6)
3341
yield True
3442
raise Exception("This fixture is broken")
3543

3644

3745
@allure.title("This test fixture teardown is broken")
3846
def test_failed_fixture_teardown(teardown_fixture):
39-
with allure.step("This is a step"):
47+
with allure.step("This is a step1"):
48+
time.sleep(7)
4049
assert True
41-
with allure.step("This is a step"):
42-
with allure.step("This is a step"):
50+
with allure.step("This is a step2"):
51+
with allure.step("This is a step3"):
52+
time.sleep(8)
4353
assert True
44-
with allure.step("This is a step"):
54+
with allure.step("This is a step4"):
55+
time.sleep(9)
4556
assert teardown_fixture

0 commit comments

Comments
 (0)