Comments (2)
Side-by-side
with the code only works if you are not using an src
directory to isolate your package source (see https://blog.ganssle.io/articles/2019/08/test-as-installed.html)
Top-level tests
is common. Depending on your build tool (setuptools or flit or poetry or other), you may need configuration to make sure that the tests are present in sdists, but not installed.
from python-packaging.
Side-by-side
with the code only works if you are not using ansrc
directory to isolate your package source (see https://blog.ganssle.io/articles/2019/08/test-as-installed.html)
Now I'm veering off-topic, but I wish there wasn't a distinction between installed/not installed. It isn't necessary in Javascript or Scheme or lots of other languages. I've been thinking about it and I think the reason comes down to the rule that submodules locate themselves -- and relative imports -- by __name__
, splitting on "."s instead of by __file__
, splitting on "/"s or better yet following "..". Can you think of any other reason?
Depending on your build tool (setuptools or flit or poetry or other), you may need configuration to make sure that the tests are present in sdists, but not installed.
Just to spread this knowledge around since it's going to get buried, PyPA now seems to be advocating either
echo include tests/*.py >> MANIFEST.in
or using https://pypi.org/project/setuptools-scm/. But that seems weird to me; the manifest seems fine.
from python-packaging.
Related Issues (20)
- Note any significant distinctions between distutils and setuptools HOT 9
- Non-code-files guidance requires unnecessary repetition
- Publishing on PyPi register and upload methods deprecated/not-recommended HOT 5
- Installing nose fails in `python setup.py test`, works second time through HOT 1
- ensuring submodules work
- Git repo name incorrect in setup.py
- `.pypirc` file not mentioned
- Install the package from github
- Test not detected HOT 1
- Needs updating for Python 3.x HOT 1
- Is this guide outdated?
- `test_require` is deprecated. HOT 1
- minimal.rst doesn't work HOT 1
- I think this project brings more confusion than benefit.
- Please, do not recommend nose
- Please drop the reference to 'dependency_links' - it is no longer supported
- Please change basestring to str
- Delete project because out of date HOT 1
- requirements.txt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-packaging.