@@ -641,9 +641,9 @@ def test_editable_install__local_dir_no_setup_py(
641641
642642 msg = result .stderr
643643 if deprecated_python :
644- assert 'File "setup.py" not found. ' in msg
644+ assert 'File "setup.py" or "setup.cfg" not found. ' in msg
645645 else :
646- assert msg .startswith ('ERROR: File "setup.py" not found. ' )
646+ assert msg .startswith ('ERROR: File "setup.py" or "setup.cfg" not found. ' )
647647 assert 'pyproject.toml' not in msg
648648
649649
@@ -663,9 +663,9 @@ def test_editable_install__local_dir_no_setup_py_with_pyproject(
663663
664664 msg = result .stderr
665665 if deprecated_python :
666- assert 'File "setup.py" not found. ' in msg
666+ assert 'File "setup.py" or "setup.cfg" not found. ' in msg
667667 else :
668- assert msg .startswith ('ERROR: File "setup.py" not found. ' )
668+ assert msg .startswith ('ERROR: File "setup.py" or "setup.cfg" not found. ' )
669669 assert 'A "pyproject.toml" file was found' in msg
670670
671671
@@ -1034,15 +1034,13 @@ def test_install_package_with_prefix(script, data):
10341034 result .did_create (install_path )
10351035
10361036
1037- def test_install_editable_with_prefix (script ):
1037+ def _test_install_editable_with_prefix (script , files ):
10381038 # make a dummy project
10391039 pkga_path = script .scratch_path / 'pkga'
10401040 pkga_path .mkdir ()
1041- pkga_path .joinpath ("setup.py" ).write_text (textwrap .dedent ("""
1042- from setuptools import setup
1043- setup(name='pkga',
1044- version='0.1')
1045- """ ))
1041+
1042+ for fn , contents in files .items ():
1043+ pkga_path .joinpath (fn ).write_text (textwrap .dedent (contents ))
10461044
10471045 if hasattr (sys , "pypy_version_info" ):
10481046 site_packages = os .path .join (
@@ -1087,6 +1085,28 @@ def test_install_editable_with_target(script):
10871085 result .did_create (script .scratch / 'target' / 'watching_testrunner.py' )
10881086
10891087
1088+ def test_install_editable_with_prefix_setup_py (script ):
1089+ setup_py = """
1090+ from setuptools import setup
1091+ setup(name='pkga', version='0.1')
1092+ """
1093+ _test_install_editable_with_prefix (script , {"setup.py" : setup_py })
1094+
1095+
1096+ def test_install_editable_with_prefix_setup_cfg (script ):
1097+ setup_cfg = """[metadata]
1098+ name = pkga
1099+ version = 0.1
1100+ """
1101+ pyproject_toml = """[build-system]
1102+ requires = ["setuptools", "wheel"]
1103+ build-backend = "setuptools.build_meta"
1104+ """
1105+ _test_install_editable_with_prefix (
1106+ script , {"setup.cfg" : setup_cfg , "pyproject.toml" : pyproject_toml }
1107+ )
1108+
1109+
10901110def test_install_package_conflict_prefix_and_user (script , data ):
10911111 """
10921112 Test installing a package using pip install --prefix --user errors out
0 commit comments