question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support tests_require

See original GitHub issue

I use setuptools ‘tests_require’ to specify dependencies required for testing my package.

tests_require - http://pythonhosted.org/distribute/setuptools.html#new-and-changed-setup-keywords

I have begun using wheel packaging

http://wheel.readthedocs.org/en/latest/

and building a directory of the wheels for my current packages and all their dependencies.

pip wheel --wheel-dir=/tmp/wheelhouse .

However I would like to also build wheels for all the packages listed in any of the packages tests_require.

Obviously I could explicitly specify the requirements in a duplicate test_requirements.txt file:

pip wheel --wheel-dir=/mnt/wheelhouse -r test-requirements.txt

But then I am duplicating the dependencies in both the test requirements file and in the tests_require list. I could read the test requirements file into the tests_require but that seems to be misusing requirements files which to my understanding are intended to allow users to be in control of specifying an environment of packages that are known to work together.

Requirements files - http://www.pip-installer.org/en/latest/cookbook.html

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Reactions:3
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
dholthcommented, Jun 28, 2016

A better way to specify test requirements is to use { ‘extras_require’ : { ‘test’: [‘requirement1’, ‘requirement2’] } }

Then the dedicated test_requires can ask for yourpackage[test] or you can just pip install yourpackage[test] when you want.

0reactions
dstufftcommented, Mar 30, 2017

This is not currently possible to do since setuptools doesn’t exist this information. The extras mechanism that was indicated above is the correct way to handle this on pip.

Read more comments on GitHub >

github_iconTop Results From Across the Web

E2e tests require support for fallocate while K8s does not · Issue ...
I am unsure why my overlay fs in containers doesn't support fallocate(2) while the fs on the node (ext4) does. I have queried...
Read more >
Where do I go for testing? - Labcorp OnDemand Support
Some tests require a visit to one of Labcorp's many convenient locations for sample collection. All customers purchasing in-lab testing must ...
Read more >
Test Device Requirements and Connection Options
A few tests require bundles of hundreds of kilobytes, and the largest require1,300 ... The connection options support the transfer of tests and...
Read more >
Fasting for a Blood Test: MedlinePlus Medical Test
Fasting before a blood test can help ensure the accuracy of certain types of tests. ... What types of blood tests require fasting?...
Read more >
Fasting for lab tests - Quest Diagnostics
What types of blood tests require fasting? ... Preparing children for lab tests. Get 6 simple tips to help make a child's visit...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found