Skip to content

Commit 3e8b5fa

Browse files
authored
Merge pull request #1818 from seleniumbase/refactor-pytest-ini-and-more
Refactor pytest.ini and more
2 parents 4714412 + ef1b26d commit 3e8b5fa

File tree

14 files changed

+55
-61
lines changed

14 files changed

+55
-61
lines changed

examples/locale_code_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class LocaleCodeTests(BaseCase):
66
def test_locale_code(self):
77
self.open("https://localeplanet.com/support/browser.html")
88
locale_code = self.get_locale_code()
9+
print("\nYour Browser's Locale Code: %s" % locale_code)
910
expected_text = "navigator.language: %s" % locale_code
1011
self.demo_mode = True # Display test actions
1112
self.assert_text(expected_text, "pre")

examples/master_qa/pytest.ini

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[pytest]
22

3-
# Display console output, disable cacheprovider, don't collect recordings:
4-
addopts = --capture=no -p no:cacheprovider --ignore=recordings
3+
# Display console output. Disable cacheprovider:
4+
addopts = --capture=no -p no:cacheprovider
55

6-
# Skip looking in these directories for tests:
7-
norecursedirs = .* build dist recordings temp
6+
# Skip these directories during test collection:
7+
norecursedirs = .* build dist recordings temp assets
88

9-
# Ignore warnings such as DeprecationWarning and PytestUnknownMarkWarning
9+
# Ignore DeprecationWarning, PytestUnknownMarkWarning
1010
filterwarnings =
1111
ignore::pytest.PytestWarning
1212
ignore:.*U.*mode is deprecated:DeprecationWarning
@@ -16,15 +16,14 @@ junit_family = legacy
1616

1717
# Set pytest discovery rules:
1818
# (Most of the rules here are similar to the default rules.)
19-
# (unittest.TestCase rules override the rules here for classes and functions.)
19+
# (Inheriting unittest.TestCase could override these rules.)
2020
python_files = test_*.py *_test.py *_tests.py *_suite.py *_test_*.py
2121
python_classes = Test* *Test* *Test *Tests *Suite
2222
python_functions = test_*
2323

24-
# Here are some common pytest markers:
25-
# (Some are used in the example tests.)
26-
# (pytest v4.5.0 and newer requires marker registration to prevent warnings.)
27-
# (Future versions of pytest may turn those marker warnings into errors.)
24+
# Common pytest markers used in examples:
25+
# (pytest may require marker registration to prevent warnings.)
26+
# (Future versions may turn those marker warnings into errors.)
2827
markers =
2928
marker1: custom marker
3029
marker2: custom marker

examples/migration/raw_selenium/pytest.ini

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[pytest]
22

3-
# Display console output, disable cacheprovider, don't collect recordings:
4-
addopts = --capture=no -p no:cacheprovider --ignore=recordings
3+
# Display console output. Disable cacheprovider:
4+
addopts = --capture=no -p no:cacheprovider
55

6-
# Skip looking in these directories for tests:
7-
norecursedirs = .* build dist recordings temp
6+
# Skip these directories during test collection:
7+
norecursedirs = .* build dist recordings temp assets
88

9-
# Ignore warnings such as DeprecationWarning and PytestUnknownMarkWarning
9+
# Ignore DeprecationWarning, PytestUnknownMarkWarning
1010
filterwarnings =
1111
ignore::pytest.PytestWarning
1212
ignore:.*U.*mode is deprecated:DeprecationWarning
@@ -16,15 +16,14 @@ junit_family = legacy
1616

1717
# Set pytest discovery rules:
1818
# (Most of the rules here are similar to the default rules.)
19-
# (unittest.TestCase rules override the rules here for classes and functions.)
19+
# (Inheriting unittest.TestCase could override these rules.)
2020
python_files = *.py
2121
python_classes = Test* *Test* *Test *Tests *Suite
2222
python_functions = test_*
2323

24-
# Here are some common pytest markers:
25-
# (Some are used in the example tests.)
26-
# (pytest v4.5.0 and newer requires marker registration to prevent warnings.)
27-
# (Future versions of pytest may turn those marker warnings into errors.)
24+
# Common pytest markers used in examples:
25+
# (pytest may require marker registration to prevent warnings.)
26+
# (Future versions may turn those marker warnings into errors.)
2827
markers =
2928
marker1: custom marker
3029
marker2: custom marker

examples/pytest.ini

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[pytest]
22

3-
# Display console output, disable cacheprovider, don't collect recordings:
4-
addopts = --capture=no -p no:cacheprovider --ignore=recordings
3+
# Display console output. Disable cacheprovider:
4+
addopts = --capture=no -p no:cacheprovider
55

6-
# Skip looking in these directories for tests:
7-
norecursedirs = .* build dist recordings temp
6+
# Skip these directories during test collection:
7+
norecursedirs = .* build dist recordings temp assets
88

9-
# Ignore warnings such as DeprecationWarning and PytestUnknownMarkWarning
9+
# Ignore DeprecationWarning, PytestUnknownMarkWarning
1010
filterwarnings =
1111
ignore::pytest.PytestWarning
1212
ignore:.*U.*mode is deprecated:DeprecationWarning
@@ -16,15 +16,14 @@ junit_family = legacy
1616

1717
# Set pytest discovery rules:
1818
# (Most of the rules here are similar to the default rules.)
19-
# (unittest.TestCase rules override the rules here for classes and functions.)
19+
# (Inheriting unittest.TestCase could override these rules.)
2020
python_files = test_*.py *_test.py *_tests.py *_suite.py
2121
python_classes = Test* *Test* *Test *Tests *Suite
2222
python_functions = test_*
2323

24-
# Here are some common pytest markers:
25-
# (Some are used in the example tests.)
26-
# (pytest v4.5.0 and newer requires marker registration to prevent warnings.)
27-
# (Future versions of pytest may turn those marker warnings into errors.)
24+
# Common pytest markers used in examples:
25+
# (pytest may require marker registration to prevent warnings.)
26+
# (Future versions may turn those marker warnings into errors.)
2827
markers =
2928
marker1: custom marker
3029
marker2: custom marker

examples/test_login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ def login_to_swag_labs(self):
1414
def test_swag_labs_login(self):
1515
self.login_to_swag_labs()
1616
self.assert_element("div.inventory_list")
17-
self.assert_element('.inventory_item:contains("Sauce Labs Backpack")')
17+
self.assert_element('.inventory_item:contains("Backpack")')
1818
self.js_click("a#logout_sidebar_link")
1919
self.assert_element("div#login_button_container")

examples/translations/pytest.ini

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[pytest]
22

3-
# Display console output, disable cacheprovider, don't collect recordings:
4-
addopts = --capture=no -p no:cacheprovider --ignore=recordings
3+
# Display console output. Disable cacheprovider:
4+
addopts = --capture=no -p no:cacheprovider
55

6-
# Skip looking in these directories for tests:
7-
norecursedirs = .* build dist recordings temp
6+
# Skip these directories during test collection:
7+
norecursedirs = .* build dist recordings temp assets
88

9-
# Ignore warnings such as DeprecationWarning and PytestUnknownMarkWarning
9+
# Ignore DeprecationWarning, PytestUnknownMarkWarning
1010
filterwarnings =
1111
ignore::pytest.PytestWarning
1212
ignore:.*U.*mode is deprecated:DeprecationWarning
@@ -16,15 +16,14 @@ junit_family = legacy
1616

1717
# Set pytest discovery rules:
1818
# (Most of the rules here are similar to the default rules.)
19-
# (unittest.TestCase rules override the rules here for classes and functions.)
19+
# (Inheriting unittest.TestCase could override these rules.)
2020
python_files = test_*.py *_test.py *_tests.py *_suite.py *_test_*.py
2121
python_classes = Test* *Test* *Test *Tests *Suite
2222
python_functions = test_*
2323

24-
# Here are some common pytest markers:
25-
# (Some are used in the example tests.)
26-
# (pytest v4.5.0 and newer requires marker registration to prevent warnings.)
27-
# (Future versions of pytest may turn those marker warnings into errors.)
24+
# Common pytest markers used in examples:
25+
# (pytest may require marker registration to prevent warnings.)
26+
# (Future versions may turn those marker warnings into errors.)
2827
markers =
2928
marker1: custom marker
3029
marker2: custom marker

mkdocs_build/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# mkdocs dependencies for generating the seleniumbase.io website
22
# Minimum Python version: 3.8 (for generating docs only)
33

4-
regex>=2022.10.31
4+
regex>=2023.3.23
55
pkginfo>=1.9.6
66
docutils==0.19
77
python-dateutil==2.8.2

pytest.ini

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[pytest]
22

3-
# Display console output, disable cacheprovider, don't collect recordings:
4-
addopts = --capture=no -p no:cacheprovider --ignore=recordings
3+
# Display console output. Disable cacheprovider:
4+
addopts = --capture=no -p no:cacheprovider
55

6-
# Skip looking in these directories for tests:
7-
norecursedirs = .* build dist recordings temp
6+
# Skip these directories during test collection:
7+
norecursedirs = .* build dist recordings temp assets
88

9-
# Ignore warnings such as DeprecationWarning and PytestUnknownMarkWarning
9+
# Ignore DeprecationWarning, PytestUnknownMarkWarning
1010
filterwarnings =
1111
ignore::pytest.PytestWarning
1212
ignore:.*U.*mode is deprecated:DeprecationWarning
@@ -16,15 +16,14 @@ junit_family = legacy
1616

1717
# Set pytest discovery rules:
1818
# (Most of the rules here are similar to the default rules.)
19-
# (unittest.TestCase rules override the rules here for classes and functions.)
19+
# (Inheriting unittest.TestCase could override these rules.)
2020
python_files = test_*.py *_test.py *_tests.py *_suite.py
2121
python_classes = Test* *Test* *Test *Tests *Suite
2222
python_functions = test_*
2323

24-
# Here are some common pytest markers:
25-
# (Some are used in the example tests.)
26-
# (pytest v4.5.0 and newer requires marker registration to prevent warnings.)
27-
# (Future versions of pytest may turn those marker warnings into errors.)
24+
# Common pytest markers used in examples:
25+
# (pytest may require marker registration to prevent warnings.)
26+
# (Future versions may turn those marker warnings into errors.)
2827
markers =
2928
marker1: custom marker
3029
marker2: custom marker

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ attrs>=22.2.0;python_version>="3.7"
1717
PyYAML>=6.0
1818
certifi>=2022.12.7
1919
filelock>=3.4.1;python_version<"3.7"
20-
filelock>=3.10.0;python_version>="3.7"
20+
filelock>=3.10.2;python_version>="3.7"
2121
platformdirs>=2.4.0;python_version<"3.7"
2222
platformdirs>=3.1.1;python_version>="3.7"
2323
pyparsing>=3.0.7;python_version<"3.7"

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.13.16"
2+
__version__ = "4.13.17"

0 commit comments

Comments
 (0)