File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
- Fix NameError when handling InvalidRequirement in install_req_from_req_string .
1
+ Fix `` NameError`` when handling an invalid requirement .
Original file line number Diff line number Diff line change @@ -55,9 +55,13 @@ def test_install_req_from_string_invalid_requirement(self):
55
55
Requirement strings that cannot be parsed by
56
56
packaging.requirements.Requirement raise an InstallationError.
57
57
"""
58
- with pytest .raises (InstallationError ):
58
+ with pytest .raises (InstallationError ) as excinfo :
59
59
install_req_from_req_string ("http:/this/is/invalid" )
60
60
61
+ assert str (excinfo .value ) == (
62
+ "Invalid requirement: 'http:/this/is/invalid'"
63
+ )
64
+
61
65
def test_install_req_from_string_without_comes_from (self ):
62
66
"""
63
67
Test to make sure that install_req_from_string succeeds
You can’t perform that action at this time.
0 commit comments