From 1c06dfac57e3193fa14865a50b22fa4546a869ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Thu, 16 Feb 2023 09:18:13 +0000 Subject: [PATCH] fix(unittest): use parsed args sys.argv should not have been used, switched to passed arguments See #45 --- neotest_python/unittest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neotest_python/unittest.py b/neotest_python/unittest.py index a275218..6c58aeb 100644 --- a/neotest_python/unittest.py +++ b/neotest_python/unittest.py @@ -93,7 +93,7 @@ class UnittestNeotestAdapter(NeotestAdapter): # Make sure we can import relative to current path sys.path.insert(0, os.getcwd()) # We only get a single case ID as the argument - argv = sys.argv[0:1] + self.id_to_unittest_args(args[-1]) + argv = args[:-1] + self.id_to_unittest_args(args[-1]) unittest.main( module=None, argv=argv,