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

Add failing test and fix for old-style relative import. #109

Merged
merged 5 commits into from
May 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion envisage/plugins/ipython_kernel/api.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from ipython_kernel_plugin import IPythonKernelPlugin, IPYTHON_KERNEL_PROTOCOL # noqa
from .ipython_kernel_plugin import IPythonKernelPlugin, IPYTHON_KERNEL_PROTOCOL # noqa
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from traits.api import List

from envisage._compat import STRING_BASE_CLASS
from envisage.api import Application, Plugin
from envisage.core_plugin import CorePlugin

Expand All @@ -13,7 +14,6 @@
else:
ipykernel_available = True


if ipykernel_available:
from ipykernel.kernelapp import IPKernelApp

Expand All @@ -30,6 +30,11 @@ class TestIPythonKernelPlugin(unittest.TestCase):
def tearDown(self):
IPKernelApp.clear_instance()

def test_import_from_api(self):
# Regression test for enthought/envisage#108
from envisage.plugins.ipython_kernel.api import IPYTHON_KERNEL_PROTOCOL
self.assertIsInstance(IPYTHON_KERNEL_PROTOCOL, STRING_BASE_CLASS)

def test_kernel_service(self):
# See that we can get the IPython kernel service when the plugin is
# there.
Expand Down