Skip to content

Test class without implemented abstract methods #15080

Description

@gryznar

Repro

  1. Prepare test file with code:
from abc import ABCMeta, abstractmethod

class AbstractTestFoo(metaclass=ABCMeta):
    @abstractmethod
    def test_foo(self):
        ...

class TestFoo(AbstractTestFoo):
    ...
  1. Run test file

Actual

pytest collects test successfully, but no test is found.

Expected

pytest errors at test collection stage.

  • a detailed description of the bug or problem you are having
  • output of pip list from the virtual environment you are using
  • pytest and operating system versions
  • minimal example if possible

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions