fix(unittest): use parsed args

sys.argv should not have been used, switched to passed arguments

See #45
This commit is contained in:
Rónán Carrigan
2023-02-16 09:18:13 +00:00
parent a76fb6760f
commit 1c06dfac57

View File

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