Skip to content

Tests cannot run with setuptools 18.4 #5315

Closed

Description

@itoijala

This is a setuptools regression, 18.3.2 works fine.
See https://bitbucket.org/pypa/setuptools/commits/cf565b66b855dd4df189b679206f9fb113681737.
This will probably be fixed there, I just wanted to make you aware in case it is not.

Using matplotlib from master:

$ python setup.py test --nocapture --nose-verbose --processes=5 --process-timeout=300
...
running test
Traceback (most recent call last):
  File "setup.py", line 381, in <module>
    **extra_args
  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 973, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3.5/distutils/cmd.py", line 107, in ensure_finalized
    self.finalize_options()
  File "setup.py", line 158, in finalize_options
    self.test_args = []
AttributeError: can't set attribute

Activity

  1. jenshnielsen commented on Oct 26, 2015

    @jenshnielsen
    Member

    Thanks. I think they still run with the old python tests.py I am starting to think that we should get rid of the setup.py test entry point?

  2. added this to the milestone on Oct 26, 2015
  3. tacaswell commented on Oct 26, 2015

    @tacaswell
    Member

    The reason that we have the setup.py test entry point at all is so that we can have test-only requirements.

  4. jenshnielsen commented on Oct 26, 2015

    @jenshnielsen
    Member

    Yes but we are not using it. It's breaks Travis and we have to maintain the 2 other ways of testing which does not install the test only dependencies but raises a warning if they are missing. I would much rather make go for the simple solution and just raise if nose or mock is missing that seems way more reliable to me.

  5. mdboom commented on Oct 26, 2015

    @mdboom
    Member

    I would love to make our test running more "sane" -- or at the least have fewer options. Maybe a good discussion topic for today's hangout?

  6. tacaswell commented on Oct 26, 2015

    @tacaswell
    Member

    fair enough. Ripping it back out is fine by me, it was just painful to put in.

  7. mdboom commented on Oct 26, 2015

    @mdboom
    Member

    FWIW: I wasn't advocating any particular solution here, just to revisit all the options we've ended up with and see how we can simplify. I know it was painful to get the test command in.

  8. anntzer commented on Jun 21, 2017

    @anntzer
    Contributor

    setup.py test is no longer a documented test entry point, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions