Skip to content

Commit 5d57738

Browse files
committed
Try fixing test times after GC hack
1 parent dcaca0e commit 5d57738

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

mypy/build.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3364,7 +3364,8 @@ def process_graph(graph: Graph, manager: BuildManager) -> None:
33643364
# TODO: see if it's possible to determine if we need to process only a
33653365
# _subset_ of the past SCCs instead of having to process them all.
33663366
if (
3367-
platform.python_implementation() == "CPython"
3367+
not manager.options.test_env
3368+
and platform.python_implementation() == "CPython"
33683369
and manager.gc_freeze_cycles < MAX_GC_FREEZE_CYCLES
33693370
):
33703371
# When deserializing cache we create huge amount of new objects, so even
@@ -3379,7 +3380,8 @@ def process_graph(graph: Graph, manager: BuildManager) -> None:
33793380
for prev_scc in fresh_scc_queue:
33803381
process_fresh_modules(graph, prev_scc, manager)
33813382
if (
3382-
platform.python_implementation() == "CPython"
3383+
not manager.options.test_env
3384+
and platform.python_implementation() == "CPython"
33833385
and manager.gc_freeze_cycles < MAX_GC_FREEZE_CYCLES
33843386
):
33853387
manager.gc_freeze_cycles += 1

mypy/test/testcheck.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def run_case_once(
133133
options = parse_options(original_program_text, testcase, incremental_step)
134134
options.use_builtins_fixtures = True
135135
options.show_traceback = True
136+
options.test_env = True
136137

137138
# Enable some options automatically based on test file name.
138139
if "columns" in testcase.file:

0 commit comments

Comments
 (0)