diff --git a/tools/test.py b/tools/test.py index f46b13fa30a66a..4c04c07ac854d3 100755 --- a/tools/test.py +++ b/tools/test.py @@ -702,8 +702,13 @@ def Execute(args, context, timeout=None, env={}, faketty=False): fd_in = 0 pty_out = None - # Extend environment env_copy = os.environ.copy() + + # Remove NODE_PATH + if "NODE_PATH" in env_copy: + del env_copy["NODE_PATH"] + + # Extend environment for key, value in env.iteritems(): env_copy[key] = value