When running neotest with the DAP strategy (nvim-dap), e.g.
require("neotest").run.run({ strategy = "dap" })
we make the pydebug debugger stop at "exception breakpoints"
where the exception is thrown out of a pytest method.
This will be very helpful for users to debug failing unit tests.
Having `NeotestResultCollector` (a pytest plugin) as a inner local
class would make the code a bit difficult to read due to quite much
indentation. This commit does refactoring on NeotestResultCollector
to make it a module-level class with a reference to NeotestAdapter.
This refactoring would make easier adding more pytest plugins
(e.g., debugger integration) in the future.
There should be no changes in behaviors.
* fix: unittest adapter can run specific tests/groups/files
* fix: running tests at the directory level
* refactor: tidy id_to_unittest_args and remove print