diff --git a/.gitignore b/.gitignore index da1cf7b..162fbd2 100644 --- a/.gitignore +++ b/.gitignore @@ -30,5 +30,6 @@ issue/ pytestdebug.log .tox/ .cache/ +.pytest_cache/ .eggs/ .idea/ 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/filescope.py b/xdist/scheduler/filescope.py index 6e1f066..b6c0301 100644 --- a/xdist/scheduler/filescope.py +++ b/xdist/scheduler/filescope.py @@ -20,7 +20,7 @@ class LoadFileScheduling(LoadScopeScheduling): This class behaves very much like LoadScopeScheduling, but with a file-level scope. """ - def __init(self, config, log=None): + def __init__(self, config, log=None): super(LoadFileScheduling, self).__init__(config, log) if log is None: self.log = Producer('loadfilesched') 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 diff --git a/xdist/scheduler/loadscope.py b/xdist/scheduler/loadscope.py index 3c8381a..3301133 100644 --- a/xdist/scheduler/loadscope.py +++ b/xdist/scheduler/loadscope.py @@ -6,7 +6,7 @@ from xdist.report import report_collection_diff from xdist.workermanage import parse_spec_config -class LoadScopeScheduling: +class LoadScopeScheduling(object): """Implement load scheduling across nodes, but grouping test by scope. This distributes the tests collected across all nodes so each test is run