File tree 2 files changed +10
-7
lines changed 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -316,15 +316,15 @@ class MissingCallableSuffix(Exception):
316
316
pass
317
317
318
318
319
- def _assert_valid_entrypoint (specification ):
319
+ def _raise_for_invalid_entrypoint (specification ):
320
320
entry = get_export_entry (specification )
321
321
if entry is not None and entry .suffix is None :
322
322
raise MissingCallableSuffix (str (entry ))
323
323
324
324
325
325
class PipScriptMaker (ScriptMaker ):
326
326
def make (self , specification , options = None ):
327
- _assert_valid_entrypoint (specification )
327
+ _raise_for_invalid_entrypoint (specification )
328
328
return super (PipScriptMaker , self ).make (specification , options )
329
329
330
330
Original file line number Diff line number Diff line change 15
15
from pip ._internal .req .req_install import InstallRequirement
16
16
from pip ._internal .utils .compat import WINDOWS
17
17
from pip ._internal .utils .misc import unpack_file
18
- from pip ._internal .wheel import MissingCallableSuffix , _assert_valid_entrypoint
18
+ from pip ._internal .wheel import (
19
+ MissingCallableSuffix ,
20
+ _raise_for_invalid_entrypoint ,
21
+ )
19
22
from tests .lib import DATA_DIR , assert_paths_equal
20
23
21
24
@@ -266,17 +269,17 @@ def test_get_entrypoints(tmpdir, console_scripts):
266
269
)
267
270
268
271
269
- def test_assert_valid_entrypoint_ok ():
270
- _assert_valid_entrypoint ("hello = hello:main" )
272
+ def test_raise_for_invalid_entrypoint_ok ():
273
+ _raise_for_invalid_entrypoint ("hello = hello:main" )
271
274
272
275
273
276
@pytest .mark .parametrize ("entrypoint" , [
274
277
"hello = hello" ,
275
278
"hello = hello:" ,
276
279
])
277
- def test_assert_valid_entrypoint_fail (entrypoint ):
280
+ def test_raise_for_invalid_entrypoint_fail (entrypoint ):
278
281
with pytest .raises (MissingCallableSuffix ):
279
- _assert_valid_entrypoint (entrypoint )
282
+ _raise_for_invalid_entrypoint (entrypoint )
280
283
281
284
282
285
@pytest .mark .parametrize ("outrows, expected" , [
You can’t perform that action at this time.
0 commit comments