Comments (5)
This is intentional - you are prevented to run the code without installing it. I wrote about this here https://blog.ionelmc.ro/2014/05/25/python-packaging/
If you'd like to work virtualenv-style on your project then perhaps run something alone these lines?
source .tox/py38/bin/activate
pytest ...
from cookiecutter-pylibrary.
then what trick in the tox.ini makes pytest working then ? I cannot figure out. For example, PYTHONPATH=tests shouldn't help
from cookiecutter-pylibrary.
It installs your code in the virtualenv (eg .tox/py38). This a bit more complicated but it could be summed up as python setup.py sdist && .tox/py38/bin/pip install .tox/dists/project-0.1.tar.gz
or something like that.
Where are you going with this? What's the actual problem you're having?
from cookiecutter-pylibrary.
well, i am trying to reproduce your config on one on my existing project (moving the project_name into src/project_name) and so far my pytests are not running as smoth as before. Anyway thanks for your efforts/time ! This is a hot topic.
from cookiecutter-pylibrary.
Well you need to install the code into the virtualenv you're gonna tests with. At the very least a venv/bin/python setup.py install
. Or just use tox?
from cookiecutter-pylibrary.
Related Issues (20)
- Shortcut option to disable python 2 versions HOT 10
- Adding GitHub Actions workflows HOT 1
- Remove Landscape.io
- tox bootstrap fails HOT 2
- Error with bumpversion if not github hosting HOT 4
- CI Bootstrapping errors HOT 8
- Distribution vs package naming HOT 4
- linter_config; or more broadly, options to enable automation HOT 3
- Generating CI configuration step fails
- Bad ``pre-commit`` reference for ``flake8``
- WARNING: autodoc: failed to import module 'XXX'; the following exception was raised: No module named 'pandas' HOT 5
- Add support for creating a virtual environment inside the rendered template HOT 4
- codecov coverage uploader is deprecated
- bumpversion didn't find 'version='0.0.0'' in file: 'setup.py'
- TemplateNotFound: .github\workflows\github-actions.yml HOT 1
- Multiple extensions modules from different languages HOT 2
- Bad configuration when sphnix_theme is set to furo
- Possible skip logic issue on codacy question? HOT 2
- ``bump2version`` is deprecated, new development is in **Bump My Version** HOT 3
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 cookiecutter-pylibrary.