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.
create_builtin()
1 parent 5102f3d commit 0350177Copy full SHA for 0350177
1 file changed
Lib/test/test_import/__init__.py
@@ -1253,6 +1253,28 @@ class Spec2:
1253
origin = "a\x00b"
1254
_imp.create_dynamic(Spec2())
1255
1256
+ def test_create_builtin(self):
1257
+ class Spec:
1258
+ name = None
1259
+ spec = Spec()
1260
+
1261
+ with self.assertRaisesRegex(
1262
+ TypeError,
1263
+ 'name must be string, not NoneType'
1264
+ ):
1265
+ _imp.create_builtin(spec)
1266
1267
1268
+ name = ""
1269
1270
1271
+ # gh-142029
1272
1273
1274
+ 'name must not be empty'
1275
1276
1277
1278
def test_filter_syntax_warnings_by_module(self):
1279
module_re = r'test\.test_import\.data\.syntax_warnings\z'
1280
unload('test.test_import.data.syntax_warnings')
0 commit comments