summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2023-06-19 20:15:37 +0200
committerGitHub <noreply@github.com>2023-06-19 20:15:37 +0200
commitd6e9ec40145b9edc65e8d0c65bd3f4ef8a7a27bb (patch)
treee38a635d72d672deebdc037fb6f61650d9cd4ae5 /django/test
parent3f1bc2222feeaeaeaa97ba221b7d6e41962162e7 (diff)
Refs #27079 -- Used addClassCleanup() in SeleniumTestCase.
Regression in def09bf4126d4886413adf7388882eca8e32576b.
Diffstat (limited to 'django/test')
-rw-r--r--django/test/selenium.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/test/selenium.py b/django/test/selenium.py
index 86ff9e2f4f..fa9bf461d1 100644
--- a/django/test/selenium.py
+++ b/django/test/selenium.py
@@ -115,15 +115,15 @@ class SeleniumTestCase(LiveServerTestCase, metaclass=SeleniumTestCaseBase):
cls.selenium = cls.create_webdriver()
cls.selenium.implicitly_wait(cls.implicit_wait)
super().setUpClass()
+ cls.addClassCleanup(cls._quit_selenium)
@classmethod
- def _tearDownClassInternal(cls):
+ def _quit_selenium(cls):
# quit() the WebDriver before attempting to terminate and join the
# single-threaded LiveServerThread to avoid a dead lock if the browser
# kept a connection alive.
if hasattr(cls, "selenium"):
cls.selenium.quit()
- super()._tearDownClassInternal()
@contextmanager
def disable_implicit_wait(self):