Merge "Fix load command in pdb/no-discover path"

This commit is contained in:
Zuul 2018-08-23 15:50:03 +00:00 committed by Gerrit Code Review
commit cd208b1009
2 changed files with 5 additions and 3 deletions

View File

@ -184,7 +184,9 @@ def call_testr(regex, subunit, pretty, list_tests, slowest, parallel, concur,
def call_subunit_run(test_id, pretty, subunit):
env = copy.deepcopy(os.environ)
cmd_save_results = ['testr', 'load', '--subunit']
cmd_save_results = ['stestr', 'load', '--subunit']
if not os.path.isdir('.stestr'):
commands.init_command()
if pretty:
# Use subunit run module

View File

@ -142,7 +142,7 @@ class TestCallers(base.TestCase):
msg = "Function %s not called"
function = ['python', '-m', 'subunit.run', 'project.tests.foo']
self.assertIn(function, called[0][0], msg % 'subunit.run')
function = ['testr', 'load', '--subunit']
function = ['stestr', 'load', '--subunit']
self.assertIn(function, called[1][0], msg % 'testr load')
function = ['subunit-trace', '--no-failure-debug', '-f']
self.assertIn(function, called[2][0], msg % 'subunit-trace')
@ -166,7 +166,7 @@ class TestCallers(base.TestCase):
# Validate Popen called the right function
called = mock_popen.call_args
function = ['testr', 'load', '--subunit']
function = ['stestr', 'load', '--subunit']
self.assertIn(function, called[0], "testr load not called")
def test_call_subunit_run_testtools(self):