File tree Expand file tree Collapse file tree 4 files changed +9
-13
lines changed Expand file tree Collapse file tree 4 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 4
4
import unittest
5
5
6
6
import pytest
7
- from flaky import flaky
8
7
9
8
from ipykernel .inprocess .manager import InProcessKernelManager
10
9
@@ -21,7 +20,7 @@ def tearDown(self):
21
20
if self .km .has_kernel :
22
21
self .km .shutdown_kernel ()
23
22
24
- @flaky
23
+ @pytest . mark . flaky
25
24
def test_interface (self ):
26
25
"""Does the in-process kernel manager implement the basic KM interface?"""
27
26
km = self .km
Original file line number Diff line number Diff line change 12
12
from subprocess import PIPE , Popen
13
13
14
14
import pytest
15
- from flaky import flaky
16
15
from jupyter_client .blocking .client import BlockingKernelClient
17
16
from jupyter_core import paths
18
17
@@ -91,7 +90,7 @@ def connection_file_ready(connection_file):
91
90
fid .close ()
92
91
93
92
94
- @flaky (max_runs = 3 )
93
+ @pytest . mark . flaky (max_runs = 3 )
95
94
def test_embed_kernel_basic ():
96
95
"""IPython.embed_kernel() is basically functional"""
97
96
cmd = "\n " .join (
@@ -127,7 +126,7 @@ def test_embed_kernel_basic():
127
126
assert "10" in text
128
127
129
128
130
- @flaky (max_runs = 3 )
129
+ @pytest . mark . flaky (max_runs = 3 )
131
130
def test_embed_kernel_namespace ():
132
131
"""IPython.embed_kernel() inherits calling namespace"""
133
132
cmd = "\n " .join (
@@ -166,7 +165,7 @@ def test_embed_kernel_namespace():
166
165
assert not content ["found" ]
167
166
168
167
169
- @flaky (max_runs = 3 )
168
+ @pytest . mark . flaky (max_runs = 3 )
170
169
def test_embed_kernel_reentrant ():
171
170
"""IPython.embed_kernel() can be called multiple times"""
172
171
cmd = "\n " .join (
Original file line number Diff line number Diff line change 17
17
import IPython
18
18
import psutil
19
19
import pytest
20
- from flaky import flaky
21
20
from IPython .paths import locate_profile
22
21
23
22
from .utils import (
@@ -212,7 +211,7 @@ def test_sys_path_profile_dir():
212
211
assert "" in sys_path
213
212
214
213
215
- @flaky (max_runs = 3 )
214
+ @pytest . mark . flaky (max_runs = 3 )
216
215
@pytest .mark .skipif (
217
216
sys .platform == "win32" or (sys .platform == "darwin" ),
218
217
reason = "subprocess prints fail on Windows and MacOS Python 3.8+" ,
@@ -244,7 +243,7 @@ def test_subprocess_print():
244
243
_check_master (kc , expected = True , stream = "stderr" )
245
244
246
245
247
- @flaky (max_runs = 3 )
246
+ @pytest . mark . flaky (max_runs = 3 )
248
247
def test_subprocess_noprint ():
249
248
"""mp.Process without print doesn't trigger iostream mp_mode"""
250
249
with kernel () as kc :
@@ -267,7 +266,7 @@ def test_subprocess_noprint():
267
266
_check_master (kc , expected = True , stream = "stderr" )
268
267
269
268
270
- @flaky (max_runs = 3 )
269
+ @pytest . mark . flaky (max_runs = 3 )
271
270
@pytest .mark .skipif (
272
271
(sys .platform == "win32" ) or (sys .platform == "darwin" ),
273
272
reason = "subprocess prints fail on Windows and MacOS Python 3.8+" ,
Original file line number Diff line number Diff line change 2
2
from textwrap import dedent
3
3
4
4
import pytest
5
- from flaky import flaky
6
5
7
6
from .test_embed_kernel import setup_kernel
8
7
12
11
pytest .skip ("skipping tests on windows" , allow_module_level = True )
13
12
14
13
15
- @flaky (max_runs = 3 )
14
+ @pytest . mark . flaky (max_runs = 3 )
16
15
def test_ipython_start_kernel_userns ():
17
16
import IPython
18
17
@@ -51,7 +50,7 @@ def test_ipython_start_kernel_userns():
51
50
assert EXPECTED in text
52
51
53
52
54
- @flaky (max_runs = 3 )
53
+ @pytest . mark . flaky (max_runs = 3 )
55
54
def test_ipython_start_kernel_no_userns ():
56
55
# Issue #4188 - user_ns should be passed to shell as None, not {}
57
56
cmd = dedent (
You can’t perform that action at this time.
0 commit comments