|
7 | 7 |
|
8 | 8 | from pip._internal.cli.spinners import SpinnerInterface |
9 | 9 | from pip._internal.exceptions import InstallationSubprocessError |
| 10 | +from pip._internal.utils.logging import VERBOSE |
10 | 11 | from pip._internal.utils.misc import hide_value |
11 | 12 | from pip._internal.utils.subprocess import ( |
12 | 13 | call_subprocess, |
@@ -163,7 +164,11 @@ def test_make_subprocess_output_error__non_ascii_line(): |
163 | 164 | ) |
164 | 165 | def test_call_subprocess_stdout_only(capfd, monkeypatch, stdout_only, expected): |
165 | 166 | log = [] |
166 | | - monkeypatch.setattr(subprocess_logger, "debug", lambda *args: log.append(args[0])) |
| 167 | + monkeypatch.setattr( |
| 168 | + subprocess_logger, |
| 169 | + "log", |
| 170 | + lambda level, *args: log.append(args[0]), |
| 171 | + ) |
167 | 172 | out = call_subprocess( |
168 | 173 | [ |
169 | 174 | sys.executable, |
@@ -269,9 +274,9 @@ def test_debug_logging(self, capfd, caplog): |
269 | 274 | result = call_subprocess(args, spinner=spinner) |
270 | 275 |
|
271 | 276 | expected = (['Hello', 'world'], [ |
272 | | - ('pip.subprocessor', DEBUG, 'Running command '), |
273 | | - ('pip.subprocessor', DEBUG, 'Hello'), |
274 | | - ('pip.subprocessor', DEBUG, 'world'), |
| 277 | + ('pip.subprocessor', VERBOSE, 'Running command '), |
| 278 | + ('pip.subprocessor', VERBOSE, 'Hello'), |
| 279 | + ('pip.subprocessor', VERBOSE, 'world'), |
275 | 280 | ]) |
276 | 281 | # The spinner shouldn't spin in this case since the subprocess |
277 | 282 | # output is already being logged to the console. |
|
0 commit comments