From fd2e8a67111542e03a1469dee6cfa6bff155b099 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sun, 3 Jun 2018 16:10:24 -0300 Subject: [PATCH] Make all classes subclass from object --- changelog/297.trivial.rst | 1 + xdist/dsession.py | 4 ++-- xdist/looponfail.py | 4 ++-- xdist/remote.py | 2 +- xdist/scheduler/each.py | 2 +- xdist/scheduler/load.py | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 changelog/297.trivial.rst diff --git a/changelog/297.trivial.rst b/changelog/297.trivial.rst new file mode 100644 index 0000000..8c7688e --- /dev/null +++ b/changelog/297.trivial.rst @@ -0,0 +1 @@ +Make all classes subclass from ``object`` and fix ``super()`` call in ``LoadFileScheduling``; diff --git a/xdist/dsession.py b/xdist/dsession.py index 40ed0af..941715e 100644 --- a/xdist/dsession.py +++ b/xdist/dsession.py @@ -17,7 +17,7 @@ class Interrupted(KeyboardInterrupt): """ signals an immediate interruption. """ -class DSession: +class DSession(object): """A py.test plugin which runs a distributed test session At the beginning of the test session this creates a NodeManager @@ -316,7 +316,7 @@ class DSession: self.config.hook.pytest_runtest_logreport(report=rep) -class TerminalDistReporter: +class TerminalDistReporter(object): def __init__(self, config): self.config = config self.tr = config.pluginmanager.getplugin("terminalreporter") diff --git a/xdist/looponfail.py b/xdist/looponfail.py index 8253f9a..2f97a9d 100644 --- a/xdist/looponfail.py +++ b/xdist/looponfail.py @@ -157,7 +157,7 @@ def init_worker_session(channel, args, option_dict): WorkerFailSession(config, channel).main() -class WorkerFailSession: +class WorkerFailSession(object): def __init__(self, config, channel): self.config = config self.channel = channel @@ -211,7 +211,7 @@ class WorkerFailSession: self.channel.send((trails, failreports, self.collection_failed)) -class StatRecorder: +class StatRecorder(object): def __init__(self, rootdirlist): self.rootdirlist = rootdirlist self.statcache = {} diff --git a/xdist/remote.py b/xdist/remote.py index 346d6e5..0c62c6c 100644 --- a/xdist/remote.py +++ b/xdist/remote.py @@ -14,7 +14,7 @@ import _pytest.hookspec import pytest -class WorkerInteractor: +class WorkerInteractor(object): def __init__(self, config, channel): self.config = config self.workerid = config.workerinput.get('workerid', "?") diff --git a/xdist/scheduler/each.py b/xdist/scheduler/each.py index 578d406..42bc356 100644 --- a/xdist/scheduler/each.py +++ b/xdist/scheduler/each.py @@ -4,7 +4,7 @@ from xdist.workermanage import parse_spec_config from xdist.report import report_collection_diff -class EachScheduling: +class EachScheduling(object): """Implement scheduling of test items on all nodes If a node gets added after the test run is started then it is diff --git a/xdist/scheduler/load.py b/xdist/scheduler/load.py index 02be0d7..eb90bc7 100644 --- a/xdist/scheduler/load.py +++ b/xdist/scheduler/load.py @@ -7,7 +7,7 @@ from xdist.workermanage import parse_spec_config from xdist.report import report_collection_diff -class LoadScheduling: +class LoadScheduling(object): """Implement load scheduling across nodes. This distributes the tests collected across all nodes so each test