File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -221,13 +221,15 @@ async def async_main() -> None:
221221 saved .append (agen ())
222222 await saved [- 1 ].asend (None )
223223
224+ ATTEMPT_AMOUNT = 50
225+
224226 # Actually running into the edge case requires that the run_sync_soon task
225227 # execute in between the system nursery's closure and the strong-ification
226228 # of runner.asyncgens. There's about a 25% chance that it doesn't
227229 # (if the run_sync_soon task runs before init on one tick and after init
228230 # on the next tick); if we try enough times, we can make the chance of
229231 # failure as small as we want.
230- for attempt in range (50 ):
232+ for _ in range (ATTEMPT_AMOUNT ):
231233 needs_retry = False
232234 record .clear ()
233235 saved .clear ()
@@ -240,7 +242,7 @@ async def async_main() -> None:
240242 else : # pragma: no cover
241243 pytest .fail (
242244 "Didn't manage to hit the trailing_finalizer_asyncgens case "
243- f"despite trying { attempt } times" ,
245+ f"despite trying { ATTEMPT_AMOUNT } times" ,
244246 )
245247
246248
Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ def no_underscores(symbols: Iterable[str]) -> set[str]:
175175 completions = script .complete ()
176176 static_names = no_underscores (c .name for c in completions )
177177 elif tool == "mypy" :
178+ if sys .implementation .name != "cpython" :
179+ # https://github.com/python/mypy/issues/20329
180+ pytest .skip ("mypy does not support pypy" )
181+
178182 if not RUN_SLOW : # pragma: no cover
179183 pytest .skip ("use --run-slow to check against mypy" )
180184
@@ -271,6 +275,10 @@ def no_hidden(symbols: Iterable[str]) -> set[str]:
271275
272276 if tool == "jedi" and sys .implementation .name != "cpython" :
273277 pytest .skip ("jedi does not support pypy" )
278+
279+ if tool == "mypy" and sys .implementation .name != "cpython" :
280+ # https://github.com/python/mypy/issues/20329
281+ pytest .skip ("mypy does not support pypy" )
274282
275283 if tool == "mypy" :
276284 cache = Path .cwd () / ".mypy_cache"
You can’t perform that action at this time.
0 commit comments