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 f32aa52 commit 16a9facCopy full SHA for 16a9fac
tests/test_pytypes.py
@@ -232,12 +232,14 @@ def test_constructors():
232
for k in noconv2:
233
assert noconv2[k] is expected[k]
234
235
- type_error_tests = [
+
236
+def test_non_converting_constructors():
237
+ non_converting_test_cases = [
238
("bytes", range(10)),
239
("none", 42),
240
("ellipsis", 42),
241
]
- for t, v in type_error_tests:
242
+ for t, v in non_converting_test_cases:
243
with pytest.raises(TypeError) as excinfo:
244
m.nonconverting_constructor(t, v)
245
expected_error = "Object of type '{}' is not an instance of '{}'".format(
0 commit comments