Merge pull request #297 from nicoddemus/fix-init
Fix __init__ declaration
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -30,5 +30,6 @@ issue/
|
|||||||
pytestdebug.log
|
pytestdebug.log
|
||||||
.tox/
|
.tox/
|
||||||
.cache/
|
.cache/
|
||||||
|
.pytest_cache/
|
||||||
.eggs/
|
.eggs/
|
||||||
.idea/
|
.idea/
|
||||||
|
|||||||
1
changelog/297.trivial.rst
Normal file
1
changelog/297.trivial.rst
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Make all classes subclass from ``object`` and fix ``super()`` call in ``LoadFileScheduling``;
|
||||||
@@ -17,7 +17,7 @@ class Interrupted(KeyboardInterrupt):
|
|||||||
""" signals an immediate interruption. """
|
""" signals an immediate interruption. """
|
||||||
|
|
||||||
|
|
||||||
class DSession:
|
class DSession(object):
|
||||||
"""A py.test plugin which runs a distributed test session
|
"""A py.test plugin which runs a distributed test session
|
||||||
|
|
||||||
At the beginning of the test session this creates a NodeManager
|
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)
|
self.config.hook.pytest_runtest_logreport(report=rep)
|
||||||
|
|
||||||
|
|
||||||
class TerminalDistReporter:
|
class TerminalDistReporter(object):
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
self.config = config
|
self.config = config
|
||||||
self.tr = config.pluginmanager.getplugin("terminalreporter")
|
self.tr = config.pluginmanager.getplugin("terminalreporter")
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ def init_worker_session(channel, args, option_dict):
|
|||||||
WorkerFailSession(config, channel).main()
|
WorkerFailSession(config, channel).main()
|
||||||
|
|
||||||
|
|
||||||
class WorkerFailSession:
|
class WorkerFailSession(object):
|
||||||
def __init__(self, config, channel):
|
def __init__(self, config, channel):
|
||||||
self.config = config
|
self.config = config
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
@@ -211,7 +211,7 @@ class WorkerFailSession:
|
|||||||
self.channel.send((trails, failreports, self.collection_failed))
|
self.channel.send((trails, failreports, self.collection_failed))
|
||||||
|
|
||||||
|
|
||||||
class StatRecorder:
|
class StatRecorder(object):
|
||||||
def __init__(self, rootdirlist):
|
def __init__(self, rootdirlist):
|
||||||
self.rootdirlist = rootdirlist
|
self.rootdirlist = rootdirlist
|
||||||
self.statcache = {}
|
self.statcache = {}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import _pytest.hookspec
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
class WorkerInteractor:
|
class WorkerInteractor(object):
|
||||||
def __init__(self, config, channel):
|
def __init__(self, config, channel):
|
||||||
self.config = config
|
self.config = config
|
||||||
self.workerid = config.workerinput.get('workerid', "?")
|
self.workerid = config.workerinput.get('workerid', "?")
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from xdist.workermanage import parse_spec_config
|
|||||||
from xdist.report import report_collection_diff
|
from xdist.report import report_collection_diff
|
||||||
|
|
||||||
|
|
||||||
class EachScheduling:
|
class EachScheduling(object):
|
||||||
"""Implement scheduling of test items on all nodes
|
"""Implement scheduling of test items on all nodes
|
||||||
|
|
||||||
If a node gets added after the test run is started then it is
|
If a node gets added after the test run is started then it is
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class LoadFileScheduling(LoadScopeScheduling):
|
|||||||
This class behaves very much like LoadScopeScheduling, but with a file-level scope.
|
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)
|
super(LoadFileScheduling, self).__init__(config, log)
|
||||||
if log is None:
|
if log is None:
|
||||||
self.log = Producer('loadfilesched')
|
self.log = Producer('loadfilesched')
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from xdist.workermanage import parse_spec_config
|
|||||||
from xdist.report import report_collection_diff
|
from xdist.report import report_collection_diff
|
||||||
|
|
||||||
|
|
||||||
class LoadScheduling:
|
class LoadScheduling(object):
|
||||||
"""Implement load scheduling across nodes.
|
"""Implement load scheduling across nodes.
|
||||||
|
|
||||||
This distributes the tests collected across all nodes so each test
|
This distributes the tests collected across all nodes so each test
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from xdist.report import report_collection_diff
|
|||||||
from xdist.workermanage import parse_spec_config
|
from xdist.workermanage import parse_spec_config
|
||||||
|
|
||||||
|
|
||||||
class LoadScopeScheduling:
|
class LoadScopeScheduling(object):
|
||||||
"""Implement load scheduling across nodes, but grouping test by scope.
|
"""Implement load scheduling across nodes, but grouping test by scope.
|
||||||
|
|
||||||
This distributes the tests collected across all nodes so each test is run
|
This distributes the tests collected across all nodes so each test is run
|
||||||
|
|||||||
Reference in New Issue
Block a user