Top "Pytest" questions

Simple powerful no-boilerplate testing with Python.

Pytest and Python 3

I've installed pytest 2.3.4 under Debian Linux. By default it runs under Python 2.7, but sometimes I'd like to run it under …

pytest
How do I disable a test using pytest?

Let's say I have a bunch of tests: def test_func_one(): ... def test_func_two(): ... def test_func_three(): ... …

python testing pytest
Py.test command not found, but library is installed

There are already two posts on stack overflow on this topic; however, none of them have resolved or addressed my …

terminal command pip pytest
Py.test No module named *

I have a folder structure like this App --App --app.py --Docs --Tests --test_app.py In my test_app.…

python pytest
How can I assert lists equality with pytest

I'm trying to make some unit tests with pytest. I was thinking about doing things like that: actual = b_manager.…

python unit-testing pytest
How to test single file under pytest

How do you test a single file in pytest? I could only find ignore options and no "test this file …

python pytest
How to parametrize a Pytest fixture

Consider the following Pytest: import pytest class TimeLine(object): instances = [0, 1, 2] @pytest.fixture def timeline(): return TimeLine() def test_timeline(timeline): …

python pytest
How to suppress py.test internal deprecation warnings

Is there a way to suppress the pytest's internal deprecation warnings? Context: I'm looking to evaluate the difficulty of porting …

python pytest
Test case execution order in pytest

I am using pytest. I have two files in a directory. In one of the files there is a long …

python pytest
How to run a method before all tests in all classes?

I'm writing selenium tests, with a set of classes, each class containing several tests. Each class currently opens and then …

python selenium pytest