Skip to content

With python 3 modules are importable even without __init__.py #1383

@felix-ht

Description

@felix-ht

With https://peps.python.org/pep-0420/ - released with python 3.3 it is no longer required to create an empty __init__.py file.

However Coverage still skips folders without an __init__.py

https://github.com/nedbat/coveragepy/blob/0aa1070a2c9a99e10b7790b9a6a40a631ba5514e/coverage/files.py#L409

This causes unexpected results for the total coverage as valid python code is not included in the total coverage!

rel: pytest-dev/pytest-cov#88 (comment)

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