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

Expose install_kernel for tests #7089

Merged
merged 2 commits into from Aug 26, 2019
Merged

Conversation

jtpio
Copy link
Member

@jtpio jtpio commented Aug 26, 2019

References

Following up on #6776 and #6770 to make the test framework reusable outside of JupyterLab.

Code changes

ProcessTestApp now exposes the install_kernel(kernel_name, kernel_spec) method.

Developer-facing changes

This change exposes the install_kernel method to be able to install extra kernel specs other than the default ones.

This is useful for applications and third-party extensions reusing the JestApp from jupyterlab.tests.test_app to run tests that require a specific kernel.

Example

jest_app = JestApp.instance()
jest_app.jest_dir = HERE
jest_app.install_kernel(
    kernel_name="xpython",
    kernel_spec={
        'argv': [
            'xpython',
            '-f', '{connection_file}'
        ],
        'display_name': "xpython",
        'language': 'python'
    }
)
jest_app.initialize()
jest_app.start()

User-facing changes

None

Backwards-incompatible changes

None

@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@blink1073 blink1073 added this to the 1.1 milestone Aug 26, 2019
@jtpio jtpio merged commit d24eed2 into jupyterlab:master Aug 26, 2019
@jtpio jtpio deleted the test-install-kernels branch August 26, 2019 14:05
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Sep 25, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. tag:Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants