nvim-neotest / neotest-python

MIT License
126 stars 38 forks source link

refactor(pytest): Refactor PytestNeotestAdapter #24

Closed wookayin closed 1 year ago

wookayin commented 1 year ago

This commit does refactoring on NeotestResultCollector to make it a module-level class with a reference to NeotestAdapter.

Why? Having NeotestResultCollector (a pytest plugin) as an inner local class would make the code a bit difficult to read due to quite much indentation and lots of closures.

Context: I'm working on adding DAP (debugpy) integration, and I wrote this refactoring to make the implementation of DAP integration easier.

rcarriga commented 1 year ago

Thanks for the PR! It definitely needed a bit of a cleanup :sweat_smile: