diff options
author | Jauhien Piatlicki (jauhien) <piatlicki@gmail.com> | 2013-07-02 14:36:24 +0200 |
---|---|---|
committer | Jauhien Piatlicki (jauhien) <piatlicki@gmail.com> | 2013-07-02 14:36:24 +0200 |
commit | 9b8b993e94e828c6d93efdd32b2c646bd02f17da (patch) | |
tree | 2595537b8c87bd31ab36030eb078b511c13e6d01 /tests | |
parent | base class for tests and initial commit for py2 compatibility module (diff) | |
download | g-sorcery-9b8b993e94e828c6d93efdd32b2c646bd02f17da.tar.gz g-sorcery-9b8b993e94e828c6d93efdd32b2c646bd02f17da.tar.bz2 g-sorcery-9b8b993e94e828c6d93efdd32b2c646bd02f17da.zip |
py2: super calls
Diffstat (limited to 'tests')
-rw-r--r-- | tests/server.py | 2 | ||||
-rw-r--r-- | tests/test_backend.py | 2 | ||||
-rw-r--r-- | tests/test_ebuild.py | 4 | ||||
-rw-r--r-- | tests/test_fileutils.py | 2 | ||||
-rw-r--r-- | tests/test_g_sorcery.py | 2 | ||||
-rw-r--r-- | tests/test_metadata.py | 4 | ||||
-rw-r--r-- | tests/test_package_db.py | 7 |
7 files changed, 10 insertions, 13 deletions
diff --git a/tests/server.py b/tests/server.py index ba4ed99..ef17849 100644 --- a/tests/server.py +++ b/tests/server.py @@ -15,7 +15,7 @@ import http.server, threading class Server(threading.Thread): def __init__(self): - super().__init__() + super(Server, self).__init__() server_address = ('127.0.0.1', 8080) self.httpd = http.server.HTTPServer(server_address, http.server.SimpleHTTPRequestHandler) diff --git a/tests/test_backend.py b/tests/test_backend.py index 2c28f79..0ed5ff2 100644 --- a/tests/test_backend.py +++ b/tests/test_backend.py @@ -22,7 +22,7 @@ from tests.base import BaseTest class DummyBackend(backend.Backend): def __init__(self, PackageDB, EbuildGenrator, MetadataGenerator, directory, sync_db=True, eclass_dir=""): - super().__init__(PackageDB, EbuildGenrator, MetadataGenerator, directory, + super(DummyBackend, self).__init__(PackageDB, EbuildGenrator, MetadataGenerator, directory, sync_db=sync_db, eclass_dir=eclass_dir) diff --git a/tests/test_ebuild.py b/tests/test_ebuild.py index 8e7aca4..69222e8 100644 --- a/tests/test_ebuild.py +++ b/tests/test_ebuild.py @@ -22,7 +22,7 @@ package2 = package_db.Package("app-test", "tst", "1") class DummyDB(package_db.PackageDB): def __init__(self, directory, repo_uri="", db_uri=""): - super().__init__(directory, repo_uri, db_uri) + super(DummyDB, self).__init__(directory, repo_uri, db_uri) def generate_tree(self): self.add_category("app-test") @@ -58,7 +58,7 @@ class TestEbuildGenerator(BaseTest): class DummyEbuildGeneratorFromFile(ebuild.EbuildGeneratorFromFile): def __init__(self, db, path): - super().__init__(db) + super(DummyEbuildGeneratorFromFile, self).__init__(db) self.path = path def get_template_file(self, package, description): diff --git a/tests/test_fileutils.py b/tests/test_fileutils.py index 1e3ab1f..4a67712 100644 --- a/tests/test_fileutils.py +++ b/tests/test_fileutils.py @@ -20,7 +20,7 @@ from tests.base import BaseTest class TestFileJSON(BaseTest): def setUp(self): - super().setUp() + super(TestFileJSON, self).setUp() self.path = os.path.join(self.tempdir.name, 'tst') self.name = 'tst.json' diff --git a/tests/test_g_sorcery.py b/tests/test_g_sorcery.py index bc91e97..c5a4cfd 100644 --- a/tests/test_g_sorcery.py +++ b/tests/test_g_sorcery.py @@ -21,7 +21,7 @@ from tests.base import BaseTest class TestBin(BaseTest): def setUp(self): - super().setUp() + super(TestBin, self).setUp() binpath = os.path.join(os.path.dirname( os.path.dirname(os.path.realpath(__file__))), 'bin') diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 4906541..39155fb 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -74,7 +74,7 @@ class TestXMLGenerator(BaseTest): class DummyMetadataGenerator(metadata.MetadataGenerator): def __init__(self, db): - super().__init__(db) + super(DummyMetadataGenerator, self).__init__(db) package = package_db.Package("app-test", "test", "0.1") @@ -98,7 +98,7 @@ resulting_metadata = ['<?xml version="1.0" encoding="utf-8"?>', class DummyDB(package_db.PackageDB): def __init__(self, directory, repo_uri="", db_uri=""): - super().__init__(directory, repo_uri, db_uri) + super(DummyDB, self).__init__(directory, repo_uri, db_uri) def generate_tree(self): self.add_category("app-test") diff --git a/tests/test_package_db.py b/tests/test_package_db.py index 6b1004e..0f82129 100644 --- a/tests/test_package_db.py +++ b/tests/test_package_db.py @@ -21,7 +21,7 @@ from tests.base import BaseTest class DummyDB(package_db.PackageDB): def __init__(self, directory, packages): - super().__init__(directory) + super(DummyDB, self).__init__(directory) self.packages = packages def generate_tree(self): @@ -38,7 +38,7 @@ class DummyDB(package_db.PackageDB): class TestDummyDB(BaseTest): def setUp(self): - super().setUp() + super(TestDummyDB, self).setUp() category1 = 'app-test' category2 = 'dev-test' self.packages = [package_db.Package(category1, 'test', '0.2'), @@ -48,9 +48,6 @@ class TestDummyDB(BaseTest): package_db.Package(category2, 'test', '0.2'), package_db.Package(category2, 'tst', '0.1')] - def tearDown(self): - super().tearDown() - def test_manifest(self): db = DummyDB(self.tempdir.name, self.packages) db.generate() |