Skip to content

Automatically pass arguments from python setup.py test to pytest #6392

Description

@astrofrog

At the moment, only a subset of pytest command-line arguments are available for python setup.py test, and the rest need to be passed by -a, e.g. python setup.py test -a "-x". It would be nice to simply pass any unrecognized arguments to pytest for simplicity.

Activity

  1. drdavella commented on Jul 25, 2017

    @drdavella
    Contributor

    I wouldn't mind looking at this one. It would go in hand nicely with #5806.

  2. drdavella commented on Aug 1, 2017

    @drdavella
    Contributor

    @astrofrog I'm not sure if you had a particular approach in mind for this, but after playing with it for a little while I think it's going to be pretty difficult to implement. It seems like it would require intercepting the argument parsing for the AstropyTest command, which is inherited from Command in setuptools (which itself may inherit from something in distutils). It's possible this could be done with some metaclass magic, but it won't be pretty and may involve reimplementing argument handling logic, unless I can find it in the API for setuptools or distutils.

    I'll keep thinking about it a bit but just wanted to see if you had any concrete ideas in mind when you opened the issue.

  3. bsipocz commented on Mar 19, 2019

    @bsipocz
    Member

    I suppose this is a "won't fix".
    Please reopen if we change direction and come back to enhance our own test runner instead of moving away from it.

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