Add test for rejecting pyproject.toml with empty build-system table

This commit is contained in:
Pradyun Gedam 2018-07-21 13:08:42 +05:30
parent 17d0650d5c
commit 9a076e73ab
No known key found for this signature in database
GPG Key ID: DA17C4B29CB32E4B
5 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1 @@
include pyproject.toml

View File

@ -0,0 +1 @@
#dummy

View File

@ -0,0 +1,2 @@
[build-system]
# This table is intentionally empty.

View File

@ -0,0 +1,8 @@
#!/usr/bin/env python
from setuptools import setup
setup(
name='pep518_invalid_build_system',
version='1.0.0',
py_modules=['pep518'],
)

View File

@ -47,6 +47,16 @@ def test_pep518_refuses_invalid_requires(script, data, common_wheels):
assert "does not comply with PEP 518" in result.stderr
def test_pep518_refuses_invalid_build_system(script, data, common_wheels):
result = script.pip(
'install', '-f', common_wheels,
data.src.join("pep518_invalid_build_system"),
expect_error=True
)
assert result.returncode == 1
assert "does not comply with PEP 518" in result.stderr
def test_pep518_allows_missing_requires(script, data, common_wheels):
result = script.pip(
'install', '-f', common_wheels,