diff options
author | Barry Warsaw <barry@python.org> | 2015-01-26 20:05:48 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2015-01-26 20:05:48 -0500 |
commit | e2cfd12dc79a6350d9f1f3111a15bdb6666ccad7 (patch) | |
tree | ed032085bedc0da121ea431e19bdb8f041cf9c68 /tests/unittests | |
parent | 5e2b8ef0703eb4582a5a8ba50ae7c83a8294d65a (diff) | |
download | vyos-cloud-init-e2cfd12dc79a6350d9f1f3111a15bdb6666ccad7.tar.gz vyos-cloud-init-e2cfd12dc79a6350d9f1f3111a15bdb6666ccad7.zip |
super() works in all of Python 2.6, 2.7, and 3.4.
Diffstat (limited to 'tests/unittests')
-rw-r--r-- | tests/unittests/helpers.py | 6 | ||||
-rw-r--r-- | tests/unittests/test_data.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_smartos.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_pathprefix2dict.py | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/tests/unittests/helpers.py b/tests/unittests/helpers.py index 424d0626..f92e7ac2 100644 --- a/tests/unittests/helpers.py +++ b/tests/unittests/helpers.py @@ -43,7 +43,7 @@ if PY26: # all this once Python 2.6 is dropped as a minimum requirement. class TestCase(unittest.TestCase): def setUp(self): - unittest.TestCase.setUp(self) + super(TestCase, self).setUp() self.__all_cleanups = ExitStack() def tearDown(self): @@ -147,7 +147,7 @@ def retarget_many_wrapper(new_base, am, old_func): class ResourceUsingTestCase(TestCase): def setUp(self): - TestCase.setUp(self) + super(ResourceUsingTestCase, self).setUp() self.resource_path = None def resourceLocation(self, subname=None): @@ -186,7 +186,7 @@ class ResourceUsingTestCase(TestCase): class FilesystemMockingTestCase(ResourceUsingTestCase): def setUp(self): - ResourceUsingTestCase.setUp(self) + super(FilesystemMockingTestCase, self).setUp() self.patched_funcs = ExitStack() def tearDown(self): diff --git a/tests/unittests/test_data.py b/tests/unittests/test_data.py index 7598837e..e900faa8 100644 --- a/tests/unittests/test_data.py +++ b/tests/unittests/test_data.py @@ -44,7 +44,7 @@ class FakeDataSource(sources.DataSource): class TestConsumeUserData(helpers.FilesystemMockingTestCase): def setUp(self): - helpers.FilesystemMockingTestCase.setUp(self) + super(TestConsumeUserData, self).setUp() self._log = None self._log_file = None self._log_handler = None diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py index 2fb9e1b6..b5ebf94d 100644 --- a/tests/unittests/test_datasource/test_smartos.py +++ b/tests/unittests/test_datasource/test_smartos.py @@ -118,7 +118,7 @@ class MockSerial(object): class TestSmartOSDataSource(helpers.FilesystemMockingTestCase): def setUp(self): - helpers.FilesystemMockingTestCase.setUp(self) + super(TestSmartOSDataSource, self).setUp() self.tmp = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.tmp) diff --git a/tests/unittests/test_pathprefix2dict.py b/tests/unittests/test_pathprefix2dict.py index d38260e6..7089bde6 100644 --- a/tests/unittests/test_pathprefix2dict.py +++ b/tests/unittests/test_pathprefix2dict.py @@ -9,7 +9,7 @@ import tempfile class TestPathPrefix2Dict(TestCase): def setUp(self): - TestCase.setUp(self) + super(TestPathPrefix2Dict, self).setUp() self.tmp = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.tmp) |