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

Support stdlib unittest #359

Open
logileifs opened this issue Nov 24, 2022 · 4 comments
Open

Support stdlib unittest #359

logileifs opened this issue Nov 24, 2022 · 4 comments

Comments

@logileifs
Copy link

I've noticed that the recommended way to write tests for curio programs is to use pytest and install the curio plugin. I prefer to just stick to the unittest library from the standard library so to be able to run curio tests without pytest I created a CurioTestCase class which mimics the IsolatedAsyncioTestCase included with unittest. It works with both pytest and pure unittest. I already created a pull request but I thought it would be good to open an issue as well for visibility/discussion.

@dabeaz
Copy link
Owner

dabeaz commented Nov 24, 2022

There's a recommended way to write tests? Where is this documented?

@logileifs
Copy link
Author

Well maybe not recommended but judging by the issues (#330 for example) it seems to be the standard way to write tests for curio programs.

@dabeaz
Copy link
Owner

dabeaz commented Nov 24, 2022

I don't have any official recommendation regarding the testing of Curio programs. The test suite uses pytest, but it doesn't rely upon any plugins to my knowledge.

@logileifs
Copy link
Author

Anyway, I think this would only make curio easier and more approachable. If you don't agree then feel free to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants