fix(unittest): prepend executable name in args

This commit is contained in:
Rónán Carrigan
2023-02-16 09:39:19 +00:00
parent 4398ba1063
commit dc36e8a857

View File

@@ -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,