# HG changeset patch # User Gregory Szorc # Date 1398194410 25200 # Node ID 8e8049b9bda4a2b5beefa1b5fca91c9794b3bc3d # Parent af7d3a5c330b876c435a862a15da9110608472de run-tests: remove options from Test.__init__ All options are now passed as arguments and we no longer need options. This enables us to instantiate Test from "plain old data" types. Since options must be given as arguments, it also makes people think harder about adding things that may not belong in Test. This will help ensure a proper separation of responsibility going forward. diff -r af7d3a5c330b -r 8e8049b9bda4 tests/run-tests.py --- a/tests/run-tests.py Tue Apr 22 12:17:23 2014 -0700 +++ b/tests/run-tests.py Tue Apr 22 12:20:10 2014 -0700 @@ -338,15 +338,13 @@ # Status code reserved for skipped tests (used by hghave). SKIPPED_STATUS = 80 - def __init__(self, options, path, tmpdir, abort, keeptmpdir=False, + def __init__(self, path, tmpdir, abort, keeptmpdir=False, debug=False, nodiff=False, diffviewer=None, interactive=False, timeout=defaults['timeout'], startport=defaults['port'], extraconfigopts=None, py3kwarnings=False, shell=None): """Create a test from parameters. - options are parsed command line options that control test execution. - path is the full path to the file defining the test. tmpdir is the main temporary directory to use for this test. @@ -389,7 +387,6 @@ self._testdir = os.path.dirname(path) self.errpath = os.path.join(self._testdir, '%s.err' % self.name) - self._options = options self._threadtmp = tmpdir self._abort = abort self._keeptmpdir = keeptmpdir @@ -1521,7 +1518,7 @@ refpath = os.path.join(self.testdir, test) tmpdir = os.path.join(self.hgtmp, 'child%d' % count) - return testcls(self.options, refpath, tmpdir, self.abort, + return testcls(refpath, tmpdir, self.abort, keeptmpdir=self.options.keep_tmpdir, debug=self.options.debug, nodiff = self.options.nodiff,