From dc165ec8e5698ffc6dee6b510f1f92c9fd7467fe Mon Sep 17 00:00:00 2001 From: chillaranand Date: Sun, 22 Jan 2017 12:27:14 +0530 Subject: Refs #23919 -- Replaced super(ClassName, self) with super() in docs. --- docs/topics/testing/tools.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/topics/testing') diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 91f9690827..258e205aad 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -704,13 +704,13 @@ If your tests make any database queries, use subclasses @classmethod def setUpClass(cls): - super(MyTestCase, cls).setUpClass() + super().setUpClass() ... @classmethod def tearDownClass(cls): ... - super(MyTestCase, cls).tearDownClass() + super().tearDownClass() Be sure to account for Python's behavior if an exception is raised during ``setUpClass()``. If that happens, neither the tests in the class nor @@ -880,14 +880,14 @@ The code for this test may look as follows:: @classmethod def setUpClass(cls): - super(MySeleniumTests, cls).setUpClass() + super().setUpClass() cls.selenium = WebDriver() cls.selenium.implicitly_wait(10) @classmethod def tearDownClass(cls): cls.selenium.quit() - super(MySeleniumTests, cls).tearDownClass() + super().tearDownClass() def test_login(self): self.selenium.get('%s%s' % (self.live_server_url, '/login/')) -- cgit v1.3