Skip to content

Package is accidentally shipping its tests #475

Open
@bluenote10

Description

@bluenote10

🐛 Describe the bug

It looks like this package is accidentally shipping its tests. This can be easily verified with:

pip show --files azure-functions-durable

Which shows that there are 76 tests files shipped by the package into a top-level package called tests. This has a few small issues:

  • It bloats the package size.
  • It leads to collisions with other packages that accidentally ship their tests as tests module (they just overwrite each other in the site-packages directory).
  • It can lead to issues for users if it conflicts with their tests package.

🤔 Expected behavior

The shipped package should not include its tests.

Possible cause / solution

It looks like the setup.py already lists tests under exclude:

packages=find_packages(exclude=[
"tests",
"samples",
"scripts",
"azure"
]),

However if I remember correctly the pattern should be tests/* or tests* or tests.* or so to really affect subfolders. Otherwise the listing of azure itself would lead to the exclusion of the whole code (in this case it is most likely just about the exclusion of the top-level __init__.py).

Steps to reproduce

pip install azure-functions-durable
pip show --files azure-functions-durable

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Priority 3bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions