File: test_utils.py

package info (click to toggle)
python-attrs 25.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,004 kB
  • sloc: python: 10,495; makefile: 153
file content (19 lines) | stat: -rw-r--r-- 440 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from .utils import simple_class


class TestSimpleClass:
    """
    Tests for the testing helper function `make_class`.
    """

    def test_returns_class(self):
        """
        Returns a class object.
        """
        assert type is simple_class().__class__

    def test_returns_distinct_classes(self):
        """
        Each call returns a completely new class.
        """
        assert simple_class() is not simple_class()