neotest-python
neotest-python copied to clipboard
Add support for nose2
Nose2 is also a test runner. It would be cool if that would be supported as well.
Happy to add support but I've never used nose2 so I have idea on what's required and can't say it'll be a priority. I'd be happy to help anyone who wishes to contribute though!
I am trying to implement it myself, but I'm having a hard time understanding the code so far. I'll see if I find time to complete it.
The main thing needed is a runner adapter class in the python code which will be added to this function https://github.com/rcarriga/neotest-python/blob/9e2db9375c02aa2b7fe1e7017d233ec2de20ee58/neotest_python/init.py#L14
The class just needs to implement a run
method which will take the list of arguments for the runner and a callback for streamed results (I wouldn't worry about streaming for the initial implementation). It should return a dict of position IDs to result dicts, you can see typeddict definitions for the results here https://github.com/rcarriga/neotest-python/blob/9e2db9375c02aa2b7fe1e7017d233ec2de20ee58/neotest_python/base.py#L18-L25
Depending on how similar nose is to pytest/unittest for how tests are structured that should be all that's needed, apart from updating docs :smile: