Skip to content

TST: pytest different behavior running all or only specific tests #4965

Closed

Description

@josef-pkt

It's the first time in a long time that I run the entire test suite instead of by directory or modules.

I get many failures when running the entire test suite, but they don't show up when I run individual subpackages, folders or modules.

It's not clear to me what's going on, and entire test runs take a long time to quickly investigate.
(I ran the test suite on the commandline with pytest path_to_statsmodels but the windows shell shows at the end only a very small part of the output. During the run I got results like

..\eclipse_ws\statsmodels\statsmodels_py34_pr\statsmodels\genmod\tests\test_gee.
py .......F.F.F....F...F....F.FFFFF.FFFF....E.....F

running statsmodels.test() in IDLE, I get
140 failed, 6328 passed, 130 skipped, 4 xfailed, 1 xpassed, 470 error in 1403.47 seconds
with e.g. the same fails as above for test_gee.py

Activity

  1. bashtage commented on Aug 22, 2018

    @bashtage
    Member

    Examples?

    Try

    pytest statsmodels --skip-examples
    

    I regularly run the full suite without issues.

  2. josef-pkt commented on Aug 22, 2018

    @josef-pkt
    MemberAuthor

    ...\tmp>pytest M:...\statsmodels_py34_pr\statsmodels --skip-examples > pytest_20180822.log.txt 2>&1

    same result, but this time logged to a file.
    135 failed, 6284 passed, 174 skipped, 4 xfailed, 1 xpassed, 470 error in 792.08 seconds

    Looking more closely at the results, I looks like those errors and failures are all or mostly DeprecationWarnings because of my older pandas or other Warnings.

    Is there a setting that Warnings are turned into errors or failures when running the entire test suite?
    And how can I turn that off?

  3. josef-pkt commented on Aug 22, 2018

    @josef-pkt
    MemberAuthor

    maybe my pytest is too old, folder name: pytest-3.0.3.dist-info
    warnings capture in pytest mentions added in 3.1
    (I didn't find any options to change the behavior, and going through the pytest docs seems to show things that don't work for my version.)
    (I'm not going to run entire test suite on a regular basis anyway)

  4. bashtage commented on Aug 22, 2018

    @bashtage
    Member

    Probably too old. Warnings are suppressed by default when using .test() methods.

  5. jbrockmendel commented on Sep 8, 2018

    @jbrockmendel
    Contributor

    Possibly related #5110

  6. jbrockmendel commented on Sep 12, 2018

    @jbrockmendel
    Contributor

    Closed by #5148?

  7. josef-pkt commented on Sep 12, 2018

    @josef-pkt
    MemberAuthor

    Not closed,
    We only found a few problems with missing random seed when using a random test sequence.

    The problem that I had in this issue with running all unit tests locally is different, and is most likely a setup problem or it requires a newer pytest.
    I will eventually try again and get a newer pytest, but not for now.

  8. josef-pkt commented on Sep 16, 2018

    @josef-pkt
    MemberAuthor

    I updated to pytest 3.8 and the failures are gone

    >pytest path_to_statsmodels\statsmodels -r a --skip-examples > pytest_20180916_1.log.txt 2>&1

    I have fails that are all in knockoff with cvxopt which is buggy in my older version
    12 failed, 6979 passed, 167 skipped, 4 xfailed, 1 xpassed, 268 warnings in 929.00 seconds

  9. josef-pkt commented on Sep 16, 2018

    @josef-pkt
    MemberAuthor

    see also #5215 minimum version for pytest

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions