Skip to content

Commit

Permalink
Add a test for setup.py with no name
Browse files Browse the repository at this point in the history
  • Loading branch information
rotu committed Sep 19, 2019
1 parent dd03ac4 commit a9f8179
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test_package_identification_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ def test_empty_setup_py(unchanged_empty_descriptor):
assert e.match('not a Distutils setup script')


@pytest.mark.xfail
def test_setup_py_no_name(unchanged_empty_descriptor):
extension = PythonPackageIdentification()
(unchanged_empty_descriptor.path / 'setup.py').write_text(
'import setuptools; setuptools.setup(name="")')
with pytest.raises(RuntimeError):
extension.identify(unchanged_empty_descriptor)


def test_re_identify_if_non_python_package(package_descriptor):
package_descriptor.name = 'other-package'
package_descriptor.type = 'other'
Expand Down

0 comments on commit a9f8179

Please sign in to comment.