Skip to content

Commit

Permalink
Merge pull request #199 from masayukig/cleanup-unused-parameter-run_t…
Browse files Browse the repository at this point in the history
…ests

Cleanup unused parameters in _run_tests
  • Loading branch information
mtreinish authored Nov 16, 2018
2 parents a48246b + c2ec972 commit 7a1da4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion stestr/bisect_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def bisect_tests(self, spurious_failures):
repo_type=self.repo_type, repo_url=self.repo_url,
serial=self.serial, concurrency=self.concurrency,
test_path=self.test_path, top_dir=self.top_dir)
self.run_func(cmd, False, True, False, False,
self.run_func(cmd, False,
pretty_out=False,
repo_type=self.repo_type,
repo_url=self.repo_url)
Expand Down
10 changes: 4 additions & 6 deletions stestr/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def run_tests():
randomize=random, test_path=test_path, top_dir=top_dir)

run_result = _run_tests(
cmd, failing, analyze_isolation, isolated, until_failure,
cmd, until_failure,
subunit_out=subunit_out, combine_id=combine_id,
repo_type=repo_type, repo_url=repo_url,
pretty_out=pretty_out, color=color, abbreviate=abbreviate,
Expand All @@ -406,8 +406,7 @@ def run_tests():
result = run_result
return result
else:
return _run_tests(cmd, failing, analyze_isolation,
isolated, until_failure,
return _run_tests(cmd, until_failure,
subunit_out=subunit_out,
combine_id=combine_id,
repo_type=repo_type,
Expand All @@ -432,8 +431,7 @@ def run_tests():
whitelist_file=whitelist_file, black_regex=black_regex,
randomize=random, test_path=test_path,
top_dir=top_dir)
if not _run_tests(cmd, failing, analyze_isolation, isolated,
until_failure):
if not _run_tests(cmd, until_failure):
# If the test was filtered, it won't have been run.
if test_id in repo.get_test_ids(repo.latest_id()):
spurious_failures.add(test_id)
Expand All @@ -458,7 +456,7 @@ def run_tests():
return bisect_runner.bisect_tests(spurious_failures)


def _run_tests(cmd, failing, analyze_isolation, isolated, until_failure,
def _run_tests(cmd, until_failure,
subunit_out=False, combine_id=None, repo_type='file',
repo_url=None, pretty_out=True, color=False, stdout=sys.stdout,
abbreviate=False, suppress_attachments=False):
Expand Down
2 changes: 1 addition & 1 deletion stestr/tests/test_bisect_return_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_bisect_serial_fail_detected(self):
lines = six.text_type(out.rstrip()).splitlines()
self.assertEqual(3, p_analyze.returncode,
'Analyze isolation returned an unexpected return code'
'Stdout: %s\nStderr: %s' % (out, err))
'\nStdout: %s\nStderr: %s' % (out, err))
last_line = ('tests.test_serial_fails.TestFakeClass.test_B '
'tests.test_serial_fails.TestFakeClass.test_A')
self.assertEqual(last_line, lines[-1])

0 comments on commit 7a1da4f

Please sign in to comment.