Skip to content

Commit 85b04c1

Browse files
authored
[suggest] Use realpath to canonicalize path in test (python#7526)
The tmp_dir we computed and the real path that was showing up in the output didn't match on OS X in the testSuggestColonMethodJSON test. Use realpath to fix the issue.
1 parent 61cdc95 commit 85b04c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/test/testfinegrained.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def maybe_suggest(self, step: int, server: Server, src: str, tmp_dir: str) -> Li
290290
if json:
291291
# JSON contains already escaped \ on Windows, so requires a bit of care.
292292
val = val.replace('\\\\', '\\')
293-
val = val.replace(tmp_dir + os.path.sep, '')
293+
val = val.replace(os.path.realpath(tmp_dir) + os.path.sep, '')
294294
output.extend(val.strip().split('\n'))
295295
return normalize_messages(output)
296296

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy