Answer the question
In order to leave comments, you need to log in
What does deselected mean in Pytest?
I'm trying to figure it out with pytest.
import pytest
@pytest.fixture()
def resource_setup(request):
print("\nresource_setup")
def resource_teardown():
print("\nresource_teardown")
request.addfinalizer(resource_teardown)
def test_1_that_needs_resource(resource_setup):
print("test_1_that_needs_resource")
def test_2_that_does_not():
print("test_2_that_does_not")
def test_3_that_does_again(resource_setup):
print("test_3_that_does_again")
============================= test session starts =============================
platform win32 -- Python 3.5.2, pytest-3.0.5, py-1.4.32, pluggy-0.4.0
rootdir: D:\[PYTHON\_learn\py_test, inifile:
collected 3 items
test_my_fixt.py
resource_setup
test_3_that_does_again
.
resource_teardown
============================= 2 tests deselected ==============================
=================== 1 passed, 2 deselected in 0.03 seconds ====================
Answer the question
In order to leave comments, you need to log in
from pprint import pprint
pprint([1,1,1,1,1,1,1])
might be useful
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question