diff options
author | Stéphane Bidoul <stephane.bidoul@gmail.com> | 2023-03-19 10:33:00 +0100 |
---|---|---|
committer | Stéphane Bidoul <stephane.bidoul@gmail.com> | 2023-03-31 09:47:09 +0200 |
commit | 64967c79072e908510e0627d8571ae920337e43f (patch) | |
tree | 9b1e691135eb748a1e94e351a9178a9c9792facd /tests | |
parent | bc3feef9ccc1ffb295703002fad7eaae061633c1 (diff) | |
download | pip-64967c79072e908510e0627d8571ae920337e43f.tar.gz |
Fix test_install_requirements_with_options
This test depended on setup.py install, and tbh, I don't see a good
reason to attempt an install when testing the requirements file parser.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/test_req_file.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tests/unit/test_req_file.py b/tests/unit/test_req_file.py index be369f1a0..4d5bee249 100644 --- a/tests/unit/test_req_file.py +++ b/tests/unit/test_req_file.py @@ -1,7 +1,6 @@ import collections import logging import os -import subprocess import textwrap from optparse import Values from pathlib import Path @@ -880,14 +879,4 @@ class TestParseRequirements: ) ) - req.source_dir = os.curdir - with mock.patch.object(subprocess, "Popen") as popen: - popen.return_value.stdout.readline.return_value = b"" - try: - req.install([]) - except Exception: - pass - - last_call = popen.call_args_list[-1] - args = last_call[0][0] - assert 0 < args.index(global_option) < args.index("install") + assert req.global_options == [global_option] |