Top "Pytest" questions

Simple powerful no-boilerplate testing with Python.

"Apps aren't loaded yet" when trying to run pytest-django

Using the (partial) polls app from the Django tutorial as an example, I'm trying to get pytest-django to run. Using …

python django pytest pytest-django
py.test to test flask register, AssertionError: Popped wrong request context

I'm using flask to do register and login: from flask.ext.security.views import register, login class Register(Resource): def …

python pytest flask-login
pytest - rerun failed test after all other tests

In my scenario, I have one test that writes a file, and one (but potentially many more) tests that would …

python pytest xdist
How to show warnings in py.test

I just ran py.test on my code and got the following output: ================== 6 passed, 2 pytest-warnings in 40.79 seconds ======================= However, I cannot …

python django testing pytest pytest-django
Django test VS pytest

I am new to django unittest and pytest. However, I started to feel that pytest test case is more compact …

python django pytest django-unittest pytest-django
pytest ScopeMismatch error: how to use fixtures properly

For the following piece of code: @pytest.fixture(scope="module") def dummy_article(request, db): return mixer.blend("core.article", …

python pytest pytest-django
python - Flask test_client() doesn't have request.authorization with pytest

I have problem when testing my flask app with pytest. App is required basic auth which is parameters of request.…

python-2.7 unit-testing flask pytest werkzeug
How do I force pytest to write color output?

How do I force pytest to show the results in color, even when writing to a pipe? There does not …

pytest
PyCharm noinspection for whole file?

Is it possible to disable an inspection for the whole file in PyCharm? The reason this is needed is when …

python pycharm pytest