BUG: `tests` module is included in distribution
See original GitHub issueIn conda, I get the following error:
ClobberError: This transaction has incompatible packages due to a shared path.
packages: conda-forge/noarch::pyprojroot-0.2.0-py_0, pytorch/noarch::captum-0.3.1-0
path: 'lib/python3.8/site-packages/tests/__init__.py'
This suggests that this package is distributing a module called tests
, which is wrong.
I assume that the same problem will occur with pip too.
In my experience, the best solution is a src
layout as described in https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure and https://hynek.me/articles/testing-packaging/#src.
It’s also worth noting that the “tests outside application code” pattern usually doesn’t make the tests
directory into a module: https://docs.pytest.org/en/latest/goodpractices.html?highlight=src#tests-outside-application-code. Note that this good practice guide also strongly suggests a src layout.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Defect Clustering and Pareto Principle - Software Testing Help
Defect clustering means a small number of modules containing most of the defects. Basically, the defects are not distributed uniformly across ...
Read more >Test-Kwalitee-Extra fails two tests with perl-5.29.8 - CPAN
To: bug-Test-Kwalitee-Extra@rt.cpan.org, Chad Granum <exodist7@gmail.com> ... Detail: This distribution uses a module or a dist in its test suite that's not ...
Read more >7 Principles of Software Testing with Examples - Guru99
Defect Clustering which states that a small number of modules contain most of the defects detected. This is the application of the Pareto ......
Read more >Which Software Test Metrics You Should Care About and Why
Metrics include Number of Tests Run, Defects per Test Hour, and Average Time to Test a Bug Fix. Defect distribution – Helps you...
Read more >An Empirical Study of Bugs in Test Code - People
analysis, we only included projects that had at least one test bug report. ... Figure 4 depicts the distribution of silent horror bug...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @jamesmyatt , we are planning to do the 0.4.0 release in the next few weeks, so this fix will be included there.
Thanks for catching this issue @jamesmyatt and the great suggestions! You are right, we were unintentionally distributing this tests module. For now, we have tested a fix to exclude the tests module, which should resolve the issue for future releases.