diff --git a/tests/integration/pping_test.py b/tests/integration/pping_test.py index 6152e34cfa..b3ee67a59e 100644 --- a/tests/integration/pping_test.py +++ b/tests/integration/pping_test.py @@ -2,6 +2,7 @@ various pping integration tests """ import os +import sys from pathlib import Path import getpass from shutil import which @@ -76,7 +77,8 @@ def get_root_method(): if os.geteuid() == 0: return [] elif os.system("sudo true") == 0: - return ["sudo", "-E"] + pythonpath = ":".join(sys.path) + return ["sudo", "-E", "PYTHONPATH=%s" % pythonpath] elif os.system("gosu root true") == 0: return ["gosu", "root"] else: