Skip to content

Commit a3d37bc

Browse files
committed
mac privatetmp moment
1 parent b342946 commit a3d37bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mypy/test/testfinegrained.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ def get_options(self, source: str, testcase: DataDrivenTestCase, build_cache: bo
164164

165165
return options
166166

167+
def fixup(self, output: list[str]) -> list[str]:
168+
# HACK: for some reason, macs can use this privatetmp folder
169+
return [line.replace("/privatetmp/", "tmp/") for line in output]
170+
167171
def run_check(self, server: Server, sources: list[BuildSource]) -> list[str]:
168172
response = server.check(sources, export_types=True, is_tty=False, terminal_width=-1)
169173
out = response["out"] or response["err"]
@@ -324,7 +328,7 @@ def maybe_suggest(self, step: int, server: Server, src: str, tmp_dir: str) -> li
324328
val = val.replace(os.path.realpath(tmp_dir) + os.path.sep, "")
325329
val = val.replace(os.path.abspath(tmp_dir) + os.path.sep, "")
326330
output.extend(val.strip().split("\n"))
327-
return normalize_messages(output)
331+
return self.fixup(normalize_messages(output))
328332

329333
def maybe_inspect(self, step: int, server: Server, src: str) -> list[str]:
330334
output: list[str] = []

0 commit comments

Comments
 (0)