Skip to content

Commit 3b3015e

Browse files
author
Konstantinacc
committed
Removed @pytest.fixture requires_extension.
Files that were affected: conftest.py, test_sketch.py. The requires_extension fixture was removed since now we are able to install Chrome extension on Chrome versions > 41 and there is no need to skip tests that require extension when running tests under Chrome.
1 parent 5017a8f commit 3b3015e

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

tests/common/sketch/test_sketch.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@ def test_boards_dropdown(self):
5454

5555
assert boards_dropdown.first_selected_option.text == TEST_BOARD
5656

57-
@pytest.mark.requires_extension
5857
def test_ports_dropdown(self):
5958
"""Tests that the ports dropdown exists."""
6059
ports = self.get_element(By.ID, "cb_cf_ports")
6160
assert ports.text == 'No ports detected'
6261

63-
@pytest.mark.requires_extension
6462
def test_run_with_no_port(self):
6563
"""Makes sure that there is an error when we attempt to run with no
6664
port selected."""
@@ -72,13 +70,11 @@ def test_run_with_no_port(self):
7270
)
7371
)
7472

75-
@pytest.mark.requires_extension
7673
def test_speeds_dropdown(self):
7774
"""Tests that the speeds dropdown exists."""
7875
self.get_element(By.ID, "serial_monitor_toggle").click()
7976
self.get_element(By.ID, "cb_cf_baud_rates")
8077

81-
@pytest.mark.requires_extension
8278
def test_serial_monitor_disables_fields(self):
8379
"""Tests that opening the serial monitor disables the port and baudrate
8480
fields."""

tests/conftest.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -149,26 +149,3 @@ def test_some_feature():
149149
required_url = request.node.get_marker('requires_url').args[0]
150150
if required_url.rstrip('/') != testing_url.rstrip('/'):
151151
pytest.skip('skipped test that requires --url=%s' % required_url)
152-
153-
154-
@pytest.fixture(autouse=True)
155-
def requires_extension(request, webdriver):
156-
"""Mark that a test requires the codebender extension.
157-
Ideally, this marker would not be necessary. However, it is used so that we
158-
skip tests when running under chrome that require the extension (for now).
159-
This is due to the fact that the chrome driver leaves open the
160-
"confirm extension" dialogue without actually installing it.
161-
162-
This functionality should be invoked as a pytest marker, e.g.:
163-
164-
```
165-
@pytest.mark.requires_extension
166-
def test_some_feature():
167-
...
168-
```
169-
"""
170-
if request.node.get_marker('requires_extension'):
171-
if webdriver.desired_capabilities["browserName"] == "chrome":
172-
pytest.skip("skipped test that requires codebender extension. "
173-
"The current webdriver is Chrome, and the ChromeDriver "
174-
"does not properly install extensions.")

0 commit comments

Comments
 (0)