Skip to content

Disable cache in non-incremental tests #3255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mypy/test/testcheck.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Type checker test cases"""

import os.path
import os
import re
import shutil
import sys
Expand Down Expand Up @@ -154,6 +154,8 @@ def run_case_once(self, testcase: DataDrivenTestCase, incremental: int = 0) -> N
options.strict_optional = True
if incremental:
options.incremental = True
else:
options.cache_dir = os.devnull # Dont waste time writing cache

sources = []
for module_name, program_path, program_text in module_data:
Expand Down
3 changes: 2 additions & 1 deletion mypy/test/testdeps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Test cases for generating node-level dependencies (for fine-grained incremental checking)"""

import os.path
import os
from typing import List, Tuple, Dict

from mypy import build
Expand Down Expand Up @@ -54,6 +54,7 @@ def build(self, source: str) -> Tuple[List[str],
options = Options()
options.use_builtins_fixtures = True
options.show_traceback = True
options.cache_dir = os.devnull
try:
result = build.build(sources=[BuildSource('main', None, source)],
options=options,
Expand Down
3 changes: 2 additions & 1 deletion mypy/test/testdiff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Test cases for AST diff (used for fine-grained incremental checking)"""

import os.path
import os
from typing import List, Tuple, Dict

from mypy import build
Expand Down Expand Up @@ -62,6 +62,7 @@ def build(self, source: str) -> Tuple[List[str], Dict[str, MypyFile]]:
options = Options()
options.use_builtins_fixtures = True
options.show_traceback = True
options.cache_dir = os.devnull
try:
result = build.build(sources=[BuildSource('main', None, source)],
options=options,
Expand Down
3 changes: 2 additions & 1 deletion mypy/test/testfinegrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
information.
"""

import os.path
import os
import re
import shutil
from typing import List, Tuple, Dict
Expand Down Expand Up @@ -83,6 +83,7 @@ def build(self, source: str) -> Tuple[List[str], BuildManager, Graph]:
options = Options()
options.use_builtins_fixtures = True
options.show_traceback = True
options.cache_dir = os.devnull
try:
result = build.build(sources=[BuildSource('main', None, source)],
options=options,
Expand Down
3 changes: 2 additions & 1 deletion mypy/test/testmerge.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Test cases for AST merge (used for fine-grained incremental checking)"""

import os.path
import os
import shutil
from typing import List, Tuple, Dict

Expand Down Expand Up @@ -100,6 +100,7 @@ def build(self, source: str) -> Tuple[List[str], BuildManager, Dict[str, State]]
options = Options()
options.use_builtins_fixtures = True
options.show_traceback = True
options.cache_dir = os.devnull
try:
result = build.build(sources=[BuildSource('main', None, source)],
options=options,
Expand Down