Skip to content

python setup.py test crashes if test_suite is not set and use_2to3 is True #613

@anntzer

Description

@anntzer

With the following setup.py:

from setuptools import setup

setup(
    name='foo',
    py_modules=['foo'],
    use_2to3=True,
)

and an empty foo.py, python3 setup.py test crashes with:

running test
running build_py
running egg_info
writing /tmp/foo/build/lib/foo.egg-info/PKG-INFO
writing dependency_links to /tmp/foo/build/lib/foo.egg-info/dependency_links.txt
writing top-level names to /tmp/foo/build/lib/foo.egg-info/top_level.txt
reading manifest file '/tmp/foo/build/lib/foo.egg-info/SOURCES.txt'
writing manifest file '/tmp/foo/build/lib/foo.egg-info/SOURCES.txt'
running build_ext
TS None True
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    use_2to3=True,
  File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 170, in run
    self.run_tests()
  File "/usr/lib/python3.5/site-packages/setuptools/command/test.py", line 178, in run_tests
    module = self.test_suite.split('.')[0]
AttributeError: 'NoneType' object has no attribute 'split'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions