@@ -485,6 +485,21 @@ def test_signatures(self):
485485 msg = r'_interpreters.run_func\(\) argument 3 must be dict, not int'
486486 with self .assertRaisesRegex (TypeError , msg ):
487487 _interpreters .run_func (self .id , lambda : None , shared = 1 )
488+ # See https://github.com/python/cpython/issues/135855
489+ msg = r'_interpreters.set___main___attrs\(\) argument 2 must be dict, not int'
490+ with self .assertRaisesRegex (TypeError , msg ):
491+ _interpreters .set___main___attrs (self .id , 1 )
492+
493+ def test_invalid_shared_none (self ):
494+ msg = r'must be dict, not None'
495+ with self .assertRaisesRegex (TypeError , msg ):
496+ _interpreters .exec (self .id , 'a' , shared = None )
497+ with self .assertRaisesRegex (TypeError , msg ):
498+ _interpreters .run_string (self .id , 'a' , shared = None )
499+ with self .assertRaisesRegex (TypeError , msg ):
500+ _interpreters .run_func (self .id , lambda : None , shared = None )
501+ with self .assertRaisesRegex (TypeError , msg ):
502+ _interpreters .set___main___attrs (self .id , None )
488503
489504 def test_invalid_shared_encoding (self ):
490505 # See https://github.com/python/cpython/issues/127196
0 commit comments