Skip to content

--cov as final emelent in addopts xcreates confusing behaviour #701

Open
@ego-thales

Description

@ego-thales

Hi there,

I'm not sure this is a pytest bug but here it goes.

I have the following pyproject.toml configuration

[tool.pytest.ini_options]
testpaths = "test"
addopts = [
    "--import-mode=importlib",  # Recommended by pytest
    "--cov",
]

so I can easily use

pytest

to start my tests.

Now when I want to test only a specific file, doing

pytest specific/file.py

ignores the argument, while in the mean time, passing another optional argument such as the following

pytest -s specific/file.py

works perfectly as intended.

Am I missing a piece or is this a pytest-side problem?

Thanks in advance!

All the best.
Élie

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy