Skip to content

TST: xfail_strict setting not always respected? #8146

Closed

Description

@pllim

We have set xfail_strict = true in setup.cfg, which in theory, would turn xpass into failures. However, in testing for 3.1RC, my Windows 10 reported 2 xpassed but did not change them into failures (as shown in pytest-dev/pytest#1386 ).

Maybe this would naturally be solved if we move away from using setup.py test anyway? 🤷‍♀️

Activity

  1. pllim commented on Nov 17, 2018

    @pllim
    MemberAuthor

    So, I suspected maybe because I was lazy and used pip install astropy==3.1rc1 (the first thing I saw on the wiki) for testing instead of checking out the tag and testing on source dir with setup.py. So I did the latter and the xpassed disappeared. For comparison...

    Testing from pip install from non-source dir (11762 total):

    $ python -c "import astropy; astropy.test(remote_data=True)"
    ...
    11548 passed, 103 skipped, 109 xfailed, 2 xpassed, 3138 warnings in 436.91 seconds
    

    Testing from setup.py from source dir (12107 total; 345 extra from above):

    $ python setup.py test --remote-data
    ...
    11889 passed, 107 skipped, 111 xfailed in 441.37 seconds
    

    I think I'll bury this as mysterious thingies that happen when you don't test from source dir (with access to setup.cfg). One more reason to use tox (again), @drdavella ? 😅

  2. bsipocz commented on Nov 17, 2018

    @bsipocz
    Member

    So, I suspected maybe because I was lazy and used pip install astropy==3.1rc1 (the first thing I saw on the wiki) for testing instead of checking out the tag and testing on source dir with setup.py. So I did the latter and the xpassed disappeared.

    Actually testing an installed version from pip in preferred than testing the tag as the former is what users will see. But, well, I agree this is those mysterious ones that doesn't deserve too much time to spend on. ¯_(ツ)_/¯

  3. pllim commented on Nov 17, 2018

    @pllim
    MemberAuthor

    @bsipocz , indeed... though it is obvious that astropy.test() does not read in preferences set in setup.cfg (e.g., showing tests have 3k warnings instead of ignoring them). Is this something tox will handle too or do we no longer need astropy.test() when we use tox? 🤔

  4. bsipocz commented on Nov 17, 2018

    @bsipocz
    Member

    I don't think tox is being the answer for everything... :trollface:

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