Skip to content

Commit 16a9fac

Browse files
committed
Split off test_non_converting_constructors from test_constructors
1 parent f32aa52 commit 16a9fac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_pytypes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,14 @@ def test_constructors():
232232
for k in noconv2:
233233
assert noconv2[k] is expected[k]
234234

235-
type_error_tests = [
235+
236+
def test_non_converting_constructors():
237+
non_converting_test_cases = [
236238
("bytes", range(10)),
237239
("none", 42),
238240
("ellipsis", 42),
239241
]
240-
for t, v in type_error_tests:
242+
for t, v in non_converting_test_cases:
241243
with pytest.raises(TypeError) as excinfo:
242244
m.nonconverting_constructor(t, v)
243245
expected_error = "Object of type '{}' is not an instance of '{}'".format(

0 commit comments

Comments
 (0)