Skip to content

Test the test runner options #5806

Description

@pllim

As mentioned in #5798 (comment) , we need to test that our test runner options (e.g., -t) do not break.

Activity

  1. added this to the v2.0.0 milestone on Feb 13, 2017
  2. bsipocz commented on Feb 13, 2017

    @bsipocz
    Member

    I'm putting this into milestone 2.0. If no one else picks it up before the due date, ping me about it.

  3. mohanagr commented on Mar 1, 2017

    @mohanagr
    Contributor

    I want to go ahead with this. Although since it's tagged Package-Intermediate I need some help from where to start.

  4. bsipocz commented on Mar 1, 2017

    @bsipocz
    Member

    @mohanagr - I suggest to target the package-novice and not the Effort-low issues first, this one for example needs knowledge about how our testing infrastructure works (e.g. see the related issues for which this is a follow-up issue).

  5. pllim commented on Jun 14, 2017

    @pllim
    MemberAuthor

    ping @bsipocz since you asked to be pinged if no one picked this up...

  6. bsipocz commented on Jun 14, 2017

    @bsipocz
    Member

    Thanks @pllim. I try to get there before the freeze.

  7. removed this from the v2.0.0 milestone on Jun 19, 2017
  8. bsipocz commented on Jun 19, 2017

    @bsipocz
    Member

    Removing milestone, but this can go in until release as it only affects testing.

  9. drdavella commented on Jul 21, 2017

    @drdavella
    Contributor

    I'm thinking about picking this one up if no one else is working on it. Just to clarify, are you looking for just simple validation of arguments (e.g. making sure using the -t option actually results in a valid command string), or do you actually want to execute the resulting tests? The latter seems a little more complicated since you now have a test that relies on the execution of other tests.

  10. bsipocz commented on Jul 21, 2017

    @bsipocz
    Member

    @drdavella - Thanks for picking this up. I think we need a bit of the mixture of the two you mentioned, e.g. we don't need to execute the tests, but need to run them until the test collection finishes to make sure e.g. the -t option only picks up the single file rather than all of them.

  11. pllim commented on Jul 21, 2017

    @pllim
    MemberAuthor

    I wonder if it's possible to make a dummy test for this. That is, the test only has "pass". It doesn't make sense to run a real test multiple times.

  12. drdavella commented on Aug 2, 2017

    @drdavella
    Contributor

    So I have been looking at this for mumble hours and I'm sorry to say that it's just not obvious to me how this should be done. In order to test options given to the top-level test runner (e.g. -t), we need to be able to call setup.py. However, this isn't available from within an individual pytest since the tests get installed to a separate temporary build tree.

    One approach I considered is to modify the AstropyTest object to provide an option to test itself. For example, I might be able to call ./setup.py test --meta-test, which would run itself with a few different options that we care about. I made some progress towards this but am encountering some frustrating issues. And this approach has the problem of not actually being plugged into pytest at all, so it's not clear how we would interpret/report results.

    @pllim, you marked this as Effort-low. Did you have any particular approach in mind when you opened this issue? Maybe I'm just missing something obvious.

  13. pllim commented on Aug 2, 2017

    @pllim
    MemberAuthor

    Okay, maybe I had underestimated the effort and skill level needed... 😱

  14. drdavella commented on Aug 2, 2017

    @drdavella
    Contributor

    Haha, well it's entirely possible that I've been down in the weeds for too long and I'm just missing a really obvious approach.

  15. pllim commented on Aug 2, 2017

    @pllim
    MemberAuthor

    Just to clarify, "effort-low" means different things for different "package-xxx" skill levels. I thought naively it would be easy to add for someone who is somewhat familiar with pytest but that assumption is obviously wrong based on your report, so I updated it to "effort-high" for a "package-expert", just in case. Sorry for any confusion.

  16. added
    Close?Tell stale bot that this issue/PR is stale
    on Jul 8, 2021
  17. github-actions commented on Jul 8, 2021

    @github-actions
    Contributor

    This issue was labeled as Close?. Remove Close? label or this will be closed after 7 days. (This is currently a dry-run.)

  18. embray commented on Jul 8, 2021

    @embray
    Member

    Astropy testing has changed a lot since this was opened, and we don't use setup.py test anymore. So this can be closed as OBE.

  19. pllim commented on Jul 8, 2021

    @pllim
    MemberAuthor

    @embray , what does OBE mean?

  20. pllim commented on Jul 8, 2021

    @pllim
    MemberAuthor

    p.s. Agree we can close this.

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