Skip to content

Coverage report generation incompatible with pytest tmpdir feature #234

@bluenote10

Description

@bluenote10

Given a project structure like:

myproject
├── myproject
│   └── __init__.py
├── tests
│   └── myproject
│       └── test.py
└── setup.cfg

I'm running the command in the toplevel myproject directory:

py.test --cov=myproject --cov-report html

On stdout I can see the log output:

Coverage HTML written to dir htmlcov

However no output has been written, i.e., the myproject directory does not contain htmlcov (and neither of its subdirectories). Even a find / -name "*htmlcov*" reveals nothing.

Notes:

  • The output is written if I use --cov-report html:/absolute/path/to/myproject/htmlcov.
  • I get the same issue for --cov-report xml.
  • My tests chdir a lot -- can this mess up pytest-cov?

Versions:

  • pytest: 3.8.1
  • pytest-cov: 2.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions