Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Deselecting class prefixed with "Test" #2007
Is it possible to deselect a class prefixed with "Test" from collection without renaming it?
The class is imported from several test modules and thus generates several warnings:
i've tried the following to no avail:
From correspondences on IRC, it seems the only way to prevent the warnings from triggering is a conftest.py file containing the following:
import pytest @pytest.hookimpl(tryfirst=True) def pytest_pycollect_makeitem(collector, name, obj): if name == "TestPrintProduct": return IgnoreCollector(name, parent=collector) class IgnoreCollector(pytest.Collector): def collect(self): return  def reportinfo(self): return ""