Skip to content

Commit 8d6c282

Browse files
chrysleuranusjrpradyunsg
committed
Apply suggestions from code review
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
1 parent d9b5a9d commit 8d6c282

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/pip/_internal/cli/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def _get_ordered_configuration_items(
191191
# ignore empty values
192192
if not value:
193193
logger.debug(
194-
"Ignoring configuration key '%s' as it's value is empty.",
194+
"Ignoring configuration key '%s' as it's empty.",
195195
key,
196196
)
197197
continue

tests/functional/test_configuration.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ def test_user_values(self, script: PipTestEnvironment) -> None:
111111
assert "freeze.timeout: 10" in result.stdout
112112
assert re.search(r"user:\n( .+\n)+", result.stdout)
113113

114+
# Avoid state leaking for tests re-using the new config file
115+
os.remove(new_config_file)
116+
114117
def test_site_values(
115118
self, script: PipTestEnvironment, virtualenv: VirtualEnvironment
116119
) -> None:
@@ -161,7 +164,7 @@ def test_config_separated(
161164

162165
# Get legacy config file and touch it for testing purposes
163166
legacy_config_file = get_configuration_files()[kinds.USER][0]
164-
os.makedirs(legacy_config_file.rsplit("/", 1)[0])
167+
os.makedirs(os.path.dirname(legacy_config_file))
165168
open(legacy_config_file, "a").close()
166169

167170
# Site config file

0 commit comments

Comments
 (0)