-
-
Notifications
You must be signed in to change notification settings - Fork 99
[fix] Handle skipped Selenium tests in Django parallel runner #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nemesifier
merged 6 commits into
openwisp:master
from
czarflix:fix/selenium-parallel-skip-handling
Mar 23, 2026
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8458d5d
[fix] Handle skipped Selenium tests in Django parallel runner
czarflix 99a096a
[fix] Simplify Selenium skip handling follow-up #619
czarflix e89df63
[fix] Preserve remote skip events for multiple tests #619
czarflix 5e8fb26
Merge branch 'master' into fix/selenium-parallel-skip-handling
nemesifier a03b7aa
[chores] Always call stopTest if skipped
nemesifier c7a2856
[chores] Minor renaming
nemesifier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| from unittest import TestResult, skip | ||
|
|
||
| from django.test import SimpleTestCase | ||
| from django.test.runner import RemoteTestResult | ||
| from openwisp_utils.tests.selenium import SeleniumTestMixin | ||
|
|
||
|
|
||
| class TestSeleniumMixinSkipHandling(SimpleTestCase): | ||
| def _run_skipped_test(self, result_class): | ||
| class SkippedSeleniumTest(SeleniumTestMixin, SimpleTestCase): | ||
| retry_max = 0 | ||
| retry_delay = 0 | ||
|
|
||
| @classmethod | ||
| def setUpClass(cls): | ||
|
czarflix marked this conversation as resolved.
Outdated
|
||
| pass | ||
|
|
||
| @classmethod | ||
| def tearDownClass(cls): | ||
| pass | ||
|
|
||
| @skip("skip propagation regression test") | ||
| def test_skip(self): | ||
| pass | ||
|
|
||
| test = SkippedSeleniumTest("test_skip") | ||
| if result_class is RemoteTestResult: | ||
| result = result_class(stream=None, descriptions=None, verbosity=0) | ||
| else: | ||
| result = result_class() | ||
| test._setup_and_call(result) | ||
| return result | ||
|
|
||
| def test_setup_and_call_propagates_skip_to_standard_result(self): | ||
| result = self._run_skipped_test(TestResult) | ||
|
|
||
| self.assertEqual(len(result.skipped), 1) | ||
| self.assertEqual(result.skipped[0][1], "skip propagation regression test") | ||
|
|
||
| def test_setup_and_call_records_skip_event_for_remote_result(self): | ||
| result = self._run_skipped_test(RemoteTestResult) | ||
|
|
||
| self.assertIn(("addSkip", 0, "skip propagation regression test"), result.events) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.