File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ def _parse_and_recurse(
371
371
if initial_file is not None
372
372
else ""
373
373
)
374
- raise RecursionError (
374
+ raise RequirementsFileParseError (
375
375
f"{ req_path } recursively references itself in { filename } { tail } "
376
376
)
377
377
# Keeping a track where was each file first included in
Original file line number Diff line number Diff line change 9
9
10
10
import pytest
11
11
12
- import pip ._internal .exceptions
13
12
import pip ._internal .req .req_file # this will be monkeypatched
14
13
from pip ._internal .exceptions import InstallationError , RequirementsFileParseError
15
14
from pip ._internal .index .package_finder import PackageFinder
@@ -364,7 +363,7 @@ def test_recursive_requirements_file(
364
363
365
364
# When the passed requirements file recursively references itself
366
365
with pytest .raises (
367
- RecursionError ,
366
+ RequirementsFileParseError ,
368
367
match = (
369
368
f"{ path_to_string (req_files [0 ])} recursively references itself"
370
369
f" in { path_to_string (req_files [req_file_count - 1 ])} "
@@ -378,7 +377,7 @@ def test_recursive_requirements_file(
378
377
f"-r { req_files [req_file_count - 2 ].name } "
379
378
)
380
379
with pytest .raises (
381
- RecursionError ,
380
+ RequirementsFileParseError ,
382
381
match = (
383
382
f"{ path_to_string (req_files [req_file_count - 2 ])} recursively"
384
383
" references itself in"
@@ -401,7 +400,7 @@ def test_recursive_relative_requirements_file(
401
400
level_2_req_file .write_text ("-r ../../root.txt" )
402
401
403
402
with pytest .raises (
404
- RecursionError ,
403
+ RequirementsFileParseError ,
405
404
match = (
406
405
f"{ path_to_string (root_req_file )} recursively references itself in"
407
406
f" { path_to_string (level_2_req_file )} "
You can’t perform that action at this time.
0 commit comments