Skip to content

Deselecting class prefixed with "Test" #2007

Closed
@syre

Description

@syre

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:
====================================== pytest-warning summary ======================================= WC1 /vagrant/publish/marketplace/tests/test_models.py cannot collect test class 'TestPrintProduct' because it has a __init__ constructor WC1 /vagrant/publish/marketplace/tests/test_signals.py cannot collect test class 'TestPrintProduct' because it has a __init__ constructor WC1 /vagrant/publish/salechannels/tests/test_signals.py cannot collect test class 'TestPrintProduct' because it has a __init__ constructor

i've tried the following to no avail:

  • the pytest.mark.skip decorator on the class
  • setting test = False on the class as attribute
  • k flag with "not TestPrintProduct"

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributortype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions