Top "Pytest" questions

Simple powerful no-boilerplate testing with Python.

PyCharm/Python. Code doesn't run. Immediately receiving "Getting Process finished with exit code 0"

I recently switched my workstation and reinstalled all my environment on Fedora 25. When attempting to run any part of my …

python pycharm pytest fedora-25
Test if code is executed from within a py.test session

I'd like to connect to a different database if my code is running under py.test. Is there a function …

python pytest
Removing cached files after a pytest run

I'm using a joblib.Memory to cache expensive computations when running tests with py.test. The code I'm using reduces …

python pytest joblib
how to make py.test --cov skip virtualenv directory

Should I care how my tests cover the external libraries I'm using in my project ? The py.test --cov displays …

python-2.7 virtualenv pytest test-coverage
How to send post data to flask using pytest-flask

Project setting Python 3.5.3 flask 0.12.2 Directory . ├── Core │   ├── BackgroundProcessManager.py │   ├── FirebaseDatabaseManager.py │   ├── LearningManager.py │   ├── __init__.py │   ├── FrontEnd │   ├── HomePage.py │   ├── __init__.py │   ├── LICENSE ├── …

flask python-3.5 pytest
Writing a pytest function for checking the output on console (stdout)

This link gives a description how to use pytest for capturing console outputs. I tried on this following simple code, …

python printing stdout pytest
How do I make pytest fixtures work with decorated functions?

py.test seems to fail when I decorate test functions which has a fixture as an argument. def deco(func): @…

python unit-testing decorator pytest
pytest assert message customization with variable introspection

In the pytest documentation it says that you can customize the output message when an assert fails. I want to …

python rest testing pytest pytest-django
how to get which statements are missed in python test coverage

I am new to python, I have written test cases for my class , I am using python -m pytest --cov=…

python code-coverage pytest
Running pytest test functions inside a jupyter notebook

I'm working on a presentation about python testing options, and one of the technologies I want to demo is pytest. …

python jupyter-notebook pytest jupyter