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.
@@ -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',
