Move run_with_log_command() after run_stderr_with_prefix().

We do this to better parallel the test order in TestPipTestEnvironment,
since the tests using run_with_log_command() occur later.
This commit is contained in:
Chris Jerdonek 2019-05-07 06:59:25 -04:00
parent 8a9e36ee15
commit 0b8377d53f
1 changed files with 9 additions and 9 deletions

View File

@ -80,6 +80,15 @@ def test_as_import(script):
class TestPipTestEnvironment:
def run_stderr_with_prefix(self, script, prefix, **kwargs):
"""
Call run() that prints stderr with the given prefix.
"""
text = '{}: hello, world\\n'.format(prefix)
command = 'import sys; sys.stderr.write("{}")'.format(text)
args = [sys.executable, '-c', command]
script.run(*args, **kwargs)
def run_with_log_command(self, script, sub_string, **kwargs):
"""
Call run() on a command that logs a "%"-style format string using
@ -92,15 +101,6 @@ class TestPipTestEnvironment:
args = [sys.executable, '-c', command]
script.run(*args, **kwargs)
def run_stderr_with_prefix(self, script, prefix, **kwargs):
"""
Call run() that prints stderr with the given prefix.
"""
text = '{}: hello, world\\n'.format(prefix)
command = 'import sys; sys.stderr.write("{}")'.format(text)
args = [sys.executable, '-c', command]
script.run(*args, **kwargs)
@pytest.mark.parametrize('prefix', (
'DEBUG',
'INFO',