Skip to content

Commit

Permalink
one day
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Jul 3, 2023
1 parent 888c3fe commit 9489f16
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions mypy/test/teststubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,17 @@ def run_case(self, testcase: DataDrivenTestCase) -> None:
self.run_case_inner(testcase)

def run_case_inner(self, testcase: DataDrivenTestCase) -> None:
if (
testcase.name.endswith("_import")
and sys.platform == "win32"
and "GITHUB_ACTION" in os.environ
):
# These seem to trigger a RecursionError in shutil.rmtree in CI
# Possibly related to https://github.com/python/cpython/issues/79325
import pytest

pytest.skip("Skipping stubgen import tests on Windows in GitHub Actions")

extra = [] # Extra command-line args
mods = [] # Module names to process
source = "\n".join(testcase.input)
Expand All @@ -703,14 +714,6 @@ def run_case_inner(self, testcase: DataDrivenTestCase) -> None:
try:
if not testcase.name.endswith("_import"):
options.no_import = True
else:
if sys.platform == "win32" and "GITHUB_ACTION" in os.environ:
# These seem to trigger a RecursionError in shutil.rmtree in CI
# Possibly related to https://github.com/python/cpython/issues/79325
import pytest

pytest.skip("Skipping stubgen import tests on Windows in GitHub Actions")

if not testcase.name.endswith("_semanal"):
options.parse_only = True
generate_stubs(options)
Expand Down

0 comments on commit 9489f16

Please sign in to comment.