summaryrefslogtreecommitdiffstatshomepage
path: root/tools/gen-cpydiff.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-02-22 15:50:58 +1100
committerDamien George <damien.p.george@gmail.com>2017-02-22 15:50:58 +1100
commit1034d9acc84317b21b953d3e9fd6ad5519d1c570 (patch)
tree97ba13753745ccf4fdd10c5af2d458e78ff80643 /tools/gen-cpydiff.py
parent047af9b10bfc6b0ec412f8450c6bec10ab95254b (diff)
downloadmicropython-1034d9acc84317b21b953d3e9fd6ad5519d1c570.tar.gz
micropython-1034d9acc84317b21b953d3e9fd6ad5519d1c570.zip
tools/gen-cpydiff.py: Set the Python import path to find test modules.
Diffstat (limited to 'tools/gen-cpydiff.py')
-rw-r--r--tools/gen-cpydiff.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gen-cpydiff.py b/tools/gen-cpydiff.py
index 6f83bb6e86..93c8e37198 100644
--- a/tools/gen-cpydiff.py
+++ b/tools/gen-cpydiff.py
@@ -203,8 +203,9 @@ def gen_rst(results):
def main():
""" Main function """
- # clear search path to make sure tests use only builtin modules
- os.environ['MICROPYPATH'] = ''
+ # set search path so that test scripts find the test modules (and no other ones)
+ os.environ['PYTHONPATH'] = TESTPATH
+ os.environ['MICROPYPATH'] = TESTPATH
files = readfiles()
results = run_tests(files)