File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
seleniumbase/console_scripts Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ addopts = --capture=no --ignore conftest.py -p no:cacheprovider
6
6
# Ignore warnings such as DeprecationWarning and pytest.PytestUnknownMarkWarning
7
7
filterwarnings = ignore::pytest.PytestWarning
8
8
9
+ # Set pytest discovery rules:
10
+ # (Most of the rules here are similar to the default rules.)
11
+ # (unittest.TestCase rules override the rules here for classes and functions.)
12
+ python_files = test_*.py *_test.py *_tests.py *_suite.py
13
+ python_classes = Test* *Test* *Test *Tests *Suite
14
+ python_functions = test_*
15
+
9
16
# Here are the pytest markers used in the example tests:
10
17
# (pytest v4.5.0 and newer requires marker registration to prevent warnings.)
11
18
# (Future versions of pytest may turn those marker warnings into errors.)
Original file line number Diff line number Diff line change @@ -55,6 +55,16 @@ def main():
55
55
data .append ("addopts = --capture=no --ignore conftest.py "
56
56
"-p no:cacheprovider" )
57
57
data .append ("filterwarnings = ignore::pytest.PytestWarning" )
58
+ data .append ("python_files = test_*.py *_test.py *_tests.py *_suite.py" )
59
+ data .append ("python_classes = Test* *Test* *Test *Tests *Suite" )
60
+ data .append ("python_functions = test_*" )
61
+ data .append ("markers =" )
62
+ data .append (" marker1: custom marker" )
63
+ data .append (" marker2: custom marker" )
64
+ data .append (" marker3: custom marker" )
65
+ data .append (" marker_test_suite: custom marker" )
66
+ data .append (" expected_failure: custom marker" )
67
+ data .append ("" )
58
68
file_path = "%s/%s" % (dir_name , "pytest.ini" )
59
69
file = codecs .open (file_path , "w+" , "utf-8" )
60
70
file .writelines ("\r \n " .join (data ))
You can’t perform that action at this time.
0 commit comments