Skip to content

Commit

Permalink
Try setting MYPYPATH explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed May 22, 2018
1 parent 9b808b9 commit 20c5eba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions whole-repo-tests/test_type_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from __future__ import division, print_function, absolute_import

import os
import subprocess

import pytest
Expand All @@ -33,6 +34,7 @@ def get_mypy_analysed_type(fname, val):
out = subprocess.Popen(
[tool_path('mypy'), fname],
stdout=subprocess.PIPE, encoding='utf-8', universal_newlines=True,
env=dict(os.environ, MYPYPATH=tools.PYTHON_SRC),
).stdout.read()
assert len(out.splitlines()) == 1
typ = out.split('error: Revealed type is ')[1].strip().strip("'")
Expand Down

0 comments on commit 20c5eba

Please sign in to comment.