From 649b273c823927650f01150462f7e2c55fe2d13f Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 22 Aug 2022 10:54:22 +0200 Subject: [PATCH] Make tests for simple-class actually run --- tests/test_utils.py | 19 +++++++++++++++++++ tests/utils.py | 18 ------------------ 2 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 tests/test_utils.py diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 00000000..92c04a1b --- /dev/null +++ b/tests/test_utils.py @@ -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() diff --git a/tests/utils.py b/tests/utils.py index 3d10621d..261d15b6 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -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()