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.

pytest needed as (runtime) requirement?

See original GitHub issue

pytest is now listed as install_requires in setup.py, and also included as ‘run requirement’ in the conda recipe. I think it’s better to use tests_require (see http://setuptools.readthedocs.io/en/latest/setuptools.html) for setup.py, and not include it in the recipe. In general I don’t think test packages should be dependencies, people that want to test will either have this in their environment already, or will read the documentation.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
mwcraigcommented, Oct 25, 2017

Well, we also need it for the Testrunner class, and I vaguely remember that we had issues with the recipe/building the conda package when it didn’t include it in the run requirements: https://travis-ci.org/conda-forge/astropy-feedstock/jobs/251188788

That should be fixable in the conda recipe, which has a separate section for test requirements (that actually works as opposed to tests_require in setup.py).

1reaction
drdavellacommented, Oct 25, 2017

@mwcraig, @bsipocz if you’re willing to wait until #6606 is merged, then we can simply add pytest-astropy to the conda recipe test requirements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get Started — pytest documentation
pytest requires: Python 3.7+ or PyPy3. Run the following command in your command line: pip install -U pytest.
Read more >
Effective Python Testing With Pytest
In this tutorial, you'll learn how to take your testing to the next level with pytest. You'll cover intermediate and advanced pytest ......
Read more >
How to pass environment variables to pytest - Stack Overflow
If I hard code these environment variables, for eg: ENV_NAME = 'staging', ENV_NUMBER = '5' in my code and then run the tests...
Read more >
pytest-dependency 0.5.1 documentation - Read the Docs
Using pytest-dependency¶ · Basic usage¶ · Naming tests¶ · Using test classes¶ · Parametrized tests¶ · Marking dependencies at runtime¶.
Read more >
Python Friday #55: Separate Development From Runtime ...
requirements.txt as you know it · coverage==5.3. Flask==1.1.2. Jinja2==2.10.3. pytest==5.4.3. pytest-cov==2.10.1. pytest · html==3.1.1 ...
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