From 13df4d7b59fc39a82abb42597901bfa470026fe9 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Thu, 1 Mar 2018 00:46:04 +0000 Subject: [PATCH] Use the vendored pydevd in tests. --- tests/__main__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/__main__.py b/tests/__main__.py index 93baf17e..496b36cc 100644 --- a/tests/__main__.py +++ b/tests/__main__.py @@ -58,6 +58,15 @@ def convert_argv(argv): return cmd + args +def fix_sys_path(): + pydevdroot = os.path.join(PROJECT_ROOT, 'ptvsd', 'pydevd') + if not sys.path[0] or sys.path[0] == '.': + sys.path.insert(1, pydevdroot) + else: + sys.path.insert(0, pydevdroot) + + if __name__ == '__main__': argv = convert_argv(sys.argv[1:]) + fix_sys_path() unittest.main(module=None, argv=argv)