diff options
| author | django-bot <ops@djangoproject.com> | 2025-07-22 20:41:41 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-23 20:17:55 -0300 |
| commit | 69a93a88edb56ba47f624dac7a21aacc47ea474f (patch) | |
| tree | f57507a4435d032493cae40e06ecb254790b67b2 /django/test/selenium.py | |
| parent | 55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff) | |
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
Diffstat (limited to 'django/test/selenium.py')
| -rw-r--r-- | django/test/selenium.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/django/test/selenium.py b/django/test/selenium.py index be8f4a815f..264ca7f713 100644 --- a/django/test/selenium.py +++ b/django/test/selenium.py @@ -29,7 +29,8 @@ class SeleniumTestCaseBase(type(LiveServerTestCase)): multiple browsers specs are provided (e.g. --selenium=firefox,chrome). """ test_class = super().__new__(cls, name, bases, attrs) - # If the test class is either browser-specific or a test base, return it. + # If the test class is either browser-specific or a test base, return + # it. if test_class.browser or not any( name.startswith("test") and callable(value) for name, value in attrs.items() ): @@ -62,7 +63,8 @@ class SeleniumTestCaseBase(type(LiveServerTestCase)): ) setattr(module, browser_test_class.__name__, browser_test_class) return test_class - # If no browsers were specified, skip this class (it'll still be discovered). + # If no browsers were specified, skip this class (it'll still be + # discovered). return unittest.skip("No browsers specified.")(test_class) @classmethod @@ -214,8 +216,8 @@ class SeleniumTestCase(LiveServerTestCase, metaclass=SeleniumTestCaseBase): if features is not None: params["features"] = features - # Not using .execute_cdp_cmd() as it isn't supported by the remote web driver - # when using --selenium-hub. + # Not using .execute_cdp_cmd() as it isn't supported by the remote web + # driver when using --selenium-hub. self.selenium.execute( driver_command="executeCdpCommand", params={"cmd": "Emulation.setEmulatedMedia", "params": params}, @@ -242,7 +244,9 @@ class SeleniumTestCase(LiveServerTestCase, metaclass=SeleniumTestCaseBase): self.selenium.save_screenshot(path) def get_browser_logs(self, source=None, level="ALL"): - """Return Chrome console logs filtered by level and optionally source.""" + """ + Return Chrome console logs filtered by level and optionally source. + """ try: logs = self.selenium.get_log("browser") except AttributeError: |
