Skip to content

Commit f36af9e

Browse files
committed
Split off test_non_converting_constructors from test_constructors
1 parent a4cd8a2 commit f36af9e

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
@@ -244,12 +244,14 @@ def test_constructors():
244244
for k in noconv2:
245245
assert noconv2[k] is expected[k]
246246

247-
type_error_tests = [
247+
248+
def test_non_converting_constructors():
249+
non_converting_test_cases = [
248250
("bytes", range(10)),
249251
("none", 42),
250252
("ellipsis", 42),
251253
]
252-
for t, v in type_error_tests:
254+
for t, v in non_converting_test_cases:
253255
with pytest.raises(TypeError) as excinfo:
254256
m.nonconverting_constructor(t, v)
255257
expected_error = "Object of type '{}' is not an instance of '{}'".format(

0 commit comments

Comments
 (0)