We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4cd8a2 commit f36af9eCopy full SHA for f36af9e
tests/test_pytypes.py
@@ -244,12 +244,14 @@ def test_constructors():
244
for k in noconv2:
245
assert noconv2[k] is expected[k]
246
247
- type_error_tests = [
+
248
+def test_non_converting_constructors():
249
+ non_converting_test_cases = [
250
("bytes", range(10)),
251
("none", 42),
252
("ellipsis", 42),
253
]
- for t, v in type_error_tests:
254
+ for t, v in non_converting_test_cases:
255
with pytest.raises(TypeError) as excinfo:
256
m.nonconverting_constructor(t, v)
257
expected_error = "Object of type '{}' is not an instance of '{}'".format(
0 commit comments