Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Update formatting in test_create_builtin()
  • Loading branch information
dr-carlos committed Dec 2, 2025
commit 5d9aa6ac62f0a69c15a3d49d11745be03761a0aa
13 changes: 3 additions & 10 deletions Lib/test/test_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,21 +1258,14 @@ class Spec:
name = None
spec = Spec()

with self.assertRaisesRegex(
TypeError,
'name must be string, not NoneType'
):
with self.assertRaisesRegex(TypeError, 'name must be string, not NoneType'):
_imp.create_builtin(spec)

class Spec:
name = ""
spec.name = ""
spec = Spec()

# gh-142029
with self.assertRaisesRegex(
TypeError,
'name must not be empty'
):
with self.assertRaisesRegex(TypeError,'name must not be empty'):
_imp.create_builtin(spec)

def test_filter_syntax_warnings_by_module(self):
Expand Down
Loading