File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010from contextlib import contextmanager
1111from subprocess import Popen , PIPE
12+ from flaky import flaky
1213
1314from jupyter_client import BlockingKernelClient
1415from jupyter_core import paths
@@ -61,6 +62,8 @@ def setup_kernel(cmd):
6162 client .stop_channels ()
6263 kernel .terminate ()
6364
65+
66+ @flaky (max_runs = 3 )
6467def test_embed_kernel_basic ():
6568 """IPython.embed_kernel() is basically functional"""
6669 cmd = '\n ' .join ([
@@ -93,6 +96,8 @@ def test_embed_kernel_basic():
9396 text = content ['data' ]['text/plain' ]
9497 assert '10' in text
9598
99+
100+ @flaky (max_runs = 3 )
96101def test_embed_kernel_namespace ():
97102 """IPython.embed_kernel() inherits calling namespace"""
98103 cmd = '\n ' .join ([
@@ -128,6 +133,7 @@ def test_embed_kernel_namespace():
128133 content = msg ['content' ]
129134 assert not content ['found' ]
130135
136+ @flaky (max_runs = 3 )
131137def test_embed_kernel_reentrant ():
132138 """IPython.embed_kernel() can be called multiple times"""
133139 cmd = '\n ' .join ([
Original file line number Diff line number Diff line change 11from .test_embed_kernel import setup_kernel
2+ from flaky import flaky
23
34TIMEOUT = 15
45
6+
7+ @flaky (max_runs = 3 )
58def test_ipython_start_kernel_userns ():
69 cmd = ('from IPython import start_kernel\n '
710 'ns = {"tre": 123}\n '
@@ -27,6 +30,8 @@ def test_ipython_start_kernel_userns():
2730 text = content ['data' ]['text/plain' ]
2831 assert u'DummyMod' in text
2932
33+
34+ @flaky (max_runs = 3 )
3035def test_ipython_start_kernel_no_userns ():
3136 # Issue #4188 - user_ns should be passed to shell as None, not {}
3237 cmd = ('from IPython import start_kernel\n '
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ def run(self):
9797 'test' : [
9898 'pytest' ,
9999 'pytest-cov' ,
100+ 'flaky' ,
100101 'nose' , # nose because there are still a few nose.tools imports hanging around
101102 ],
102103 },
You can’t perform that action at this time.
0 commit comments