diff options
| author | Sergey Maranchuk <slav0nic@python.su> | 2020-04-17 22:12:06 +0300 |
|---|---|---|
| committer | Sergey Maranchuk <slav0nic@python.su> | 2020-04-17 22:12:06 +0300 |
| commit | 6668e43d2d67db4574e08a9d54bd80eb105c1b28 (patch) | |
| tree | 10eda61b15ae53815af24af956267e2f632a46f7 /tests/test_scripts | |
| parent | 48cf45b0a1ac04e701101fa18778164825edd429 (diff) | |
| download | pyramid-6668e43d2d67db4574e08a9d54bd80eb105c1b28.tar.gz pyramid-6668e43d2d67db4574e08a9d54bd80eb105c1b28.tar.bz2 pyramid-6668e43d2d67db4574e08a9d54bd80eb105c1b28.zip | |
inheriting from `object` not necessary in py3
Diffstat (limited to 'tests/test_scripts')
| -rw-r--r-- | tests/test_scripts/dummy.py | 26 | ||||
| -rw-r--r-- | tests/test_scripts/test_pdistreport.py | 6 | ||||
| -rw-r--r-- | tests/test_scripts/test_proutes.py | 2 | ||||
| -rw-r--r-- | tests/test_scripts/test_pshell.py | 4 | ||||
| -rw-r--r-- | tests/test_scripts/test_pviews.py | 10 |
5 files changed, 24 insertions, 24 deletions
diff --git a/tests/test_scripts/dummy.py b/tests/test_scripts/dummy.py index 4a848e043..5768f071e 100644 --- a/tests/test_scripts/dummy.py +++ b/tests/test_scripts/dummy.py @@ -3,7 +3,7 @@ from zope.interface import implementer from pyramid.interfaces import IMultiView -class DummyTweens(object): +class DummyTweens: def __init__(self, implicit, explicit): self._implicit = implicit self.explicit = explicit @@ -20,7 +20,7 @@ class Dummy: dummy_root = Dummy() -class DummyRegistry(object): +class DummyRegistry: settings = {} def queryUtility(self, iface, default=None, name=''): @@ -30,7 +30,7 @@ class DummyRegistry(object): dummy_registry = DummyRegistry() -class DummyShell(object): +class DummyShell: env = {} help = '' called = False @@ -54,7 +54,7 @@ class DummyApp: self.registry = dummy_registry -class DummyMapper(object): +class DummyMapper: def __init__(self, *routes): self.routes = routes @@ -62,7 +62,7 @@ class DummyMapper(object): return self.routes -class DummyRoute(object): +class DummyRoute: def __init__( self, name, pattern, factory=None, matchdict=None, predicate=None ): @@ -91,7 +91,7 @@ class DummyRequest: self.matchdict = {} -class DummyView(object): +class DummyView: def __init__(self, **attrs): self.__request_attrs__ = attrs @@ -100,18 +100,18 @@ class DummyView(object): @implementer(IMultiView) -class DummyMultiView(object): +class DummyMultiView: def __init__(self, *views, **attrs): self.views = [(None, view, None) for view in views] self.__request_attrs__ = attrs -class DummyCloser(object): +class DummyCloser: def __call__(self): self.called = True -class DummyBootstrap(object): +class DummyBootstrap: def __init__( self, app=None, @@ -154,7 +154,7 @@ class DummyBootstrap(object): } -class DummyEntryPoint(object): +class DummyEntryPoint: def __init__(self, name, module): self.name = name self.module = module @@ -163,7 +163,7 @@ class DummyEntryPoint(object): return self.module -class DummyPkgResources(object): +class DummyPkgResources: def __init__(self, entry_point_values): self.entry_points = [] @@ -174,13 +174,13 @@ class DummyPkgResources(object): return self.entry_points -class dummy_setup_logging(object): +class dummy_setup_logging: def __call__(self, config_uri, global_conf): self.config_uri = config_uri self.defaults = global_conf -class DummyLoader(object): +class DummyLoader: def __init__( self, settings=None, app_settings=None, app=None, server=None ): diff --git a/tests/test_scripts/test_pdistreport.py b/tests/test_scripts/test_pdistreport.py index 031a6ff2b..079722734 100644 --- a/tests/test_scripts/test_pdistreport.py +++ b/tests/test_scripts/test_pdistreport.py @@ -64,7 +64,7 @@ class TestPDistReportCommand(unittest.TestCase): ) -class DummyPkgResources(object): +class DummyPkgResources: def __init__(self, working_set=()): self.working_set = working_set @@ -72,12 +72,12 @@ class DummyPkgResources(object): return Version('1') -class Version(object): +class Version: def __init__(self, version): self.version = version -class DummyDistribution(object): +class DummyDistribution: def __init__(self, name): self.project_name = name self.version = '1' diff --git a/tests/test_scripts/test_proutes.py b/tests/test_scripts/test_proutes.py index 6ba02a7d4..a585a02aa 100644 --- a/tests/test_scripts/test_proutes.py +++ b/tests/test_scripts/test_proutes.py @@ -4,7 +4,7 @@ import unittest from . import dummy -class DummyIntrospector(object): +class DummyIntrospector: def __init__(self): self.relations = {} self.introspectables = {} diff --git a/tests/test_scripts/test_pshell.py b/tests/test_scripts/test_pshell.py index 10a9cd593..de7e17496 100644 --- a/tests/test_scripts/test_pshell.py +++ b/tests/test_scripts/test_pshell.py @@ -27,7 +27,7 @@ class TestPShellCommand(unittest.TestCase): cmd.get_config_loader = self.loader if patch_args: - class Args(object): + class Args: pass self.args = Args() @@ -35,7 +35,7 @@ class TestPShellCommand(unittest.TestCase): cmd.args.config_uri = self.args.config_uri if patch_options: - class Options(object): + class Options: pass self.options = Options() diff --git a/tests/test_scripts/test_pviews.py b/tests/test_scripts/test_pviews.py index b462b6f28..fb809fdcd 100644 --- a/tests/test_scripts/test_pviews.py +++ b/tests/test_scripts/test_pviews.py @@ -51,7 +51,7 @@ class TestPViewsCommand(unittest.TestCase): registry = Registry() @implementer(IMultiView) - class View1(object): + class View1: pass request = dummy.DummyRequest() @@ -105,7 +105,7 @@ class TestPViewsCommand(unittest.TestCase): registry = Registry() @implementer(IMultiView) - class View1(object): + class View1: pass request = dummy.DummyRequest() @@ -147,7 +147,7 @@ class TestPViewsCommand(unittest.TestCase): registry.registerUtility(IMyRoute, IRouteRequest, name='a') @implementer(IMyRoot) - class Factory(object): + class Factory: def __init__(self, request): pass @@ -190,7 +190,7 @@ class TestPViewsCommand(unittest.TestCase): registry.registerUtility(IMyRoute2, IRouteRequest, name='b') @implementer(IMyRoot) - class Factory(object): + class Factory: def __init__(self, request): pass @@ -242,7 +242,7 @@ class TestPViewsCommand(unittest.TestCase): registry.registerUtility(IMyRoute2, IRouteRequest, name='b') @implementer(IMyRoot) - class Factory(object): + class Factory: def __init__(self, request): pass |
