jupyter / jupyter/jupyter_kernel_test

Should depend on ipykernel

Open
#149 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
66
Forks
34
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.