Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
general overview of tox - documentation #867
It's important in my case because my setup.py downloads a binary that I need and puts it in the site-packages directory, which is not originally in my source code package (because I need it to be cross-platform).
Thanks for help !
Hi @cyberjoac, thanks for the
About your question: In part this depends on your configuration and in part it depends on the way the project is structured.
To get your desired outcome you need to make sure the following:
From the way how I phrased
I could think of a few ways to make sure that your tests run against the installed package, the way you have set up your project at the moment. The simplest would be to add a test that can only pass in a proper installation (e.g. stupidly checking the path of an imported package filefor containing "site-packages"). If that test fails in a tox run, then you know something is wrong.
There is one specific problem, when you use pytest together with tox, where I best refer you to these comprehensive articles about the problem (and the solution): Packaging a python library and Testing & Packaging.
The short answer how to make always absolutely sure to avoid that pitfall is introducing a project layout that makes it impossible to import modules from a project package when the package is not installed. The layout proposed in that article and that we also use in the tox source code is having your packages in a