Coverage for tests/tests_pkg_two/test_two.py: 64%

14 statements  

« prev     ^ index     » next       coverage.py v7.2.1, created at 2024-07-25 16:40 +0300

1""" 

2 

3Example tests for package two module two 

4 

5""" 

6 

7 

8import sys 

9import datetime 

10import pytest 

11 

12 

13@pytest.mark.xdist_group(name="group1") 

14class TestsTwo: 

15 """ 

16 

17 All tests will run on the same worker if you pass '--dist loadgroup' 

18 

19 """ 

20 def test_two_example_1(self) -> None: 

21 """ 

22 Example test 1 

23 :return: None 

24 """ 

25 print(datetime.datetime.now(), file=sys.stderr) 

26 assert True 

27 

28 def test_two_example_2(self) -> None: 

29 """ 

30 Example test 2 

31 :return: None 

32 """ 

33 print(datetime.datetime.now(), file=sys.stderr) 

34 assert True 

35 

36 @pytest.mark.order("last") 

37 def test_one_last_example(self, signal_pkg_two_tests_finished): 

38 assert not signal_pkg_two_tests_finished