Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for nose2 #22

Open
valentingregoire opened this issue Oct 20, 2022 · 3 comments
Open

Add support for nose2 #22

valentingregoire opened this issue Oct 20, 2022 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@valentingregoire
Copy link

Nose2 is also a test runner. It would be cool if that would be supported as well.

@rcarriga rcarriga added enhancement New feature or request help wanted Extra attention is needed labels Oct 25, 2022
@rcarriga
Copy link
Collaborator

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!

@valentingregoire
Copy link
Author

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.

@rcarriga
Copy link
Collaborator

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 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants