Make tests for simple-class actually run

This commit is contained in:
Hynek Schlawack 2022-08-22 10:54:22 +02:00
parent e1fa525307
commit 649b273c82
No known key found for this signature in database
GPG Key ID: AE2536227F69F181
2 changed files with 19 additions and 18 deletions

19
tests/test_utils.py Normal file
View File

@ -0,0 +1,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()

View File

@ -65,21 +65,3 @@ def simple_attr(
kw_only=kw_only,
inherited=inherited,
)
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 returns_distinct_classes(self):
"""
Each call returns a completely new class.
"""
assert simple_class() is not simple_class()