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

Refactor kernel manager tests for pytest #561

Merged
merged 5 commits into from
Jul 14, 2020

Conversation

kevin-bates
Copy link
Member

This converts the kernel manager tests to the pytest framework. TestParallel was already using pytest, so this converts the other tests.

The subclasses added in #560 are now used in more tests as general subclasses and a specific subclass test now exists.

Note: There was a bug uncovered in TestParallel which was not setting the transport correctly. As a result, the tcp transport was used for tests that were meant to be tested using the ipc transport. Of those, the parallel thread and process tests fail using ipc and have been temporarily skipped in this PR.

assert km.context.closed


class TestKernelManager:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the class is necessary btw. You can just define test functions directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I was just keeping the classes around for organization purposes, although I did find it convenient to specify @pytest.mark.asyncio on the TestAsyncKernelManager declaration for its tests.

Do you want these removed and things flattened out?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I agree it's helping organize here. Was just commenting in case it wasn't known. Let's merge your work :)

@MSeal MSeal merged commit c2ae1bd into jupyter:master Jul 14, 2020
@MSeal
Copy link
Contributor

MSeal commented Jul 14, 2020

Should we kick off a patch release?

@kevin-bates
Copy link
Member Author

Thanks for the merge @MSeal. A patch release sounds like a grand idea - thank you!

@MSeal
Copy link
Contributor

MSeal commented Jul 14, 2020

Done

@kevin-bates kevin-bates deleted the pytest-kernelmanager branch January 20, 2021 21:35
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

Successfully merging this pull request may close these issues.

2 participants