@@ -318,15 +318,15 @@ def test_info_setup_complex_calls_script(demo_setup_complex_calls_script: Path)
318
318
319
319
320
320
@pytest .mark .network
321
- @pytest .mark .parametrize ("missing" , ["version" , "name" , "install_requires" ])
321
+ @pytest .mark .parametrize ("missing" , ["version" , "name" ])
322
322
def test_info_setup_missing_mandatory_should_trigger_pep517 (
323
323
mocker : MockerFixture , source_dir : Path , missing : str
324
324
) -> None :
325
325
setup = "from setuptools import setup; "
326
326
setup += "setup("
327
327
setup += 'name="demo", ' if missing != "name" else ""
328
328
setup += 'version="0.1.0", ' if missing != "version" else ""
329
- setup += 'install_requires=["package"]' if missing != "install_requires" else ""
329
+ setup += 'install_requires=["package"]'
330
330
setup += ")"
331
331
332
332
setup_py = source_dir / "setup.py"
@@ -337,6 +337,24 @@ def test_info_setup_missing_mandatory_should_trigger_pep517(
337
337
assert spy .call_count == 1
338
338
339
339
340
+ @pytest .mark .network
341
+ def test_info_setup_missing_install_requires_is_fine (
342
+ mocker : MockerFixture , source_dir : Path
343
+ ) -> None :
344
+ setup = "from setuptools import setup; "
345
+ setup += "setup("
346
+ setup += 'name="demo", '
347
+ setup += 'version="0.1.0", '
348
+ setup += ")"
349
+
350
+ setup_py = source_dir / "setup.py"
351
+ setup_py .write_text (setup )
352
+
353
+ spy = mocker .spy (VirtualEnv , "run" )
354
+ _ = PackageInfo .from_directory (source_dir )
355
+ assert spy .call_count == 0
356
+
357
+
340
358
def test_info_prefer_poetry_config_over_egg_info (fixture_dir : FixtureDirGetter ) -> None :
341
359
info = PackageInfo .from_directory (
342
360
fixture_dir ("inspection" ) / "demo_with_obsolete_egg_info"
0 commit comments