File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -153,17 +153,19 @@ def test_signature_call_non_unpackable(
153153
154154 accepts_args = pos_only or pos_or_kw or var_pos
155155 accepts_kwargs = pos_or_kw or kw_only or var_kw
156- # >=3.15.0a2-compatible message (python/cpython/pull/136395)
157- msg = " after * must be an iterable, not NoneType"
158156
159157 # Non-unpackable ``args``
160158 if accepts_args :
159+ # >=3.15.0a2-compatible message (python/cpython/pull/136395)
160+ msg = " after * must be an iterable, not NoneType"
161161 args_kwargs = [None , {}] if accepts_kwargs else [None ]
162162 with pytest .raises (TypeError , match = f"{ re .escape (msg )} $" ):
163163 ParamWithPostInit (* args_kwargs )
164164
165165 # Non-unpackable ``kwargs``
166166 if accepts_kwargs :
167+ # >=3.15.0a2-compatible message (python/cpython/pull/136395)
168+ msg = " after ** must be a mapping, not NoneType"
167169 args_kwargs = [[], None ] if accepts_args else [None ]
168170 with pytest .raises (TypeError , match = f"{ re .escape (msg )} $" ):
169171 ParamWithPostInit (* args_kwargs )
You can’t perform that action at this time.
0 commit comments