Skip to content

pytest test collection takes a lot of time (~10min for 2000 tests) #5851

@ajeain

Description

@ajeain
  • a detailed description of the bug or suggestion
    I have around 2000 tests, of which collection time takes ~10 min while running them takes 2.5 min.
  • output of pip list from the virtual environment you are using
    $ pip3 list
    DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
    asn1crypto (0.24.0)
    atomicwrites (1.3.0)
    attrs (19.1.0)
    Automat (0.6.0)
    bcrypt (3.1.6)
    blinker (1.4)
    boto3 (1.9.111)
    botocore (1.12.111)
    certifi (2019.6.16)
    cffi (1.12.2)
    chardet (3.0.4)
    click (6.7)
    cloud-init (19.1)
    colorama (0.3.7)
    command-not-found (0.3)
    configobj (5.0.6)
    constantly (15.1.0)
    cryptography (2.6.1)
    decorator (4.4.0)
    dill (0.2.9)
    distro-info (0.18ubuntu0.18.04.1)
    docutils (0.14)
    hibagent (1.0.1)
    httplib2 (0.9.2)
    hyperlink (17.3.1)
    idna (2.8)
    importlib-metadata (0.21)
    incremental (16.10.1)
    Jinja2 (2.10)
    jmespath (0.9.4)
    jsonpatch (1.16)
    jsonpointer (1.10)
    jsonschema (2.6.0)
    keyring (10.6.0)
    keyrings.alt (3.0)
    language-selector (0.1)
    MarkupSafe (1.0)
    more-itertools (7.2.0)
    netifaces (0.10.4)
    oauthlib (2.0.6)
    packaging (19.1)
    PAM (0.4.2)
    paramiko (2.0.0)
    pip (9.0.1)
    pkg-resources (0.0.0)
    pluggy (0.12.0)
    py (1.8.0)
    pyasn1 (0.4.5)
    pyasn1-modules (0.2.1)
    pycparser (2.19)
    pycrypto (2.6.1)
    pygobject (3.26.1)
    PyJWT (1.5.3)
    PyNaCl (1.3.0)
    pyOpenSSL (17.5.0)
    pyparsing (2.4.2)
    pyserial (3.4)
    pytest (5.1.2)
    pytest-jira (0.3.11)
    pytest-reportportal (1.0.7)
    python-apt (1.6.4)
    python-dateutil (2.8.0)
    python-debian (0.1.32)
    pyxdg (0.25)
    PyYAML (3.12)
    reportportal-client (3.2.0)
    requests (2.22.0)
    requests-unixsocket (0.1.5)
    retry (0.9.2)
    s3transfer (0.2.0)
    SecretStorage (2.3.1)
    service-identity (16.0.0)
    setuptools (39.0.1)
    six (1.12.0)
    ssh-import-id (5.7)
    systemd-python (234)
    Twisted (17.9.0)
    ufw (0.36)
    unattended-upgrades (0.1)
    urllib3 (1.25.3)
    wcwidth (0.1.7)
    wheel (0.30.0)
    zipp (0.6.0)
    zope.interface (4.3.2)
  • pytest and operating system versions
    5.1.2 on Ubuntu 18.04.3 LTS
  • minimal example if possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions