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

Should depend on ipykernel #149

Open
juliangilbey opened this issue Jul 31, 2024 · 0 comments
Open

Should depend on ipykernel #149

juliangilbey opened this issue Jul 31, 2024 · 0 comments

Comments

@juliangilbey
Copy link

It turns out that unittest's behaviour for subclasses is interesting: it appears to call the setUpClass method for both the subclass and the superclass. So when subclassing KernelTests for testing a kernel, and setting kernel_name as a class variable in the subclass, the setUpClass method in KernelTests is called both for this subclass with its specified kernel_name but also for jupyter_kernel_test.KernelTests itself, with kernel_name == "python3". This therefore requires ipykernel to be installed, otherwise the test fails with an error (python3 kernel not found).

The simplest solution appears to be to depend on ipykernel, so that the python3 kernel is guaranteed to be present when using this package.

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

1 participant