From dc36e8a85704e8d9eb82de243049fccaf5003470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Thu, 16 Feb 2023 09:39:19 +0000 Subject: [PATCH] fix(unittest): prepend executable name in args --- neotest_python/unittest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neotest_python/unittest.py b/neotest_python/unittest.py index d5d45ec..0aa9979 100644 --- a/neotest_python/unittest.py +++ b/neotest_python/unittest.py @@ -91,8 +91,9 @@ 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 = args[:-1] + self.id_to_unittest_args(args[-1]) + + # Prepend an executable name which is just used in output + argv = ["neotest-python"] + args[:-1] + self.id_to_unittest_args(args[-1]) unittest.main( module=None, argv=argv,