|
25 | 25 | import uuid |
26 | 26 |
|
27 | 27 | # Test imports |
28 | | -from flaky import flaky |
29 | 28 | from IPython.core import release as ipython_release |
30 | 29 | from jupyter_core import paths |
31 | 30 | from jupyter_client import BlockingKernelClient |
@@ -512,7 +511,7 @@ def test_output_from_c_libraries(kernel, capsys): |
512 | 511 | assert captured.out == "Hello from C\n" |
513 | 512 |
|
514 | 513 |
|
515 | | -@flaky(max_runs=3) |
| 514 | +@pytest.mark.flaky(max_runs=3) |
516 | 515 | def test_cwd_in_sys_path(): |
517 | 516 | """ |
518 | 517 | Test that cwd stays as the first element in sys.path after the |
@@ -550,7 +549,7 @@ def test_prioritize(kernel): |
550 | 549 | assert new_syspath == prepend_path + syspath |
551 | 550 |
|
552 | 551 |
|
553 | | -@flaky(max_runs=3) |
| 552 | +@pytest.mark.flaky(max_runs=3) |
554 | 553 | def test_multiprocessing(tmpdir): |
555 | 554 | """ |
556 | 555 | Test that multiprocessing works. |
@@ -589,7 +588,7 @@ def f(x): |
589 | 588 | assert content['found'] |
590 | 589 |
|
591 | 590 |
|
592 | | -@flaky(max_runs=3) |
| 591 | +@pytest.mark.flaky(max_runs=3) |
593 | 592 | def test_multiprocessing_2(tmpdir): |
594 | 593 | """ |
595 | 594 | Test that multiprocessing works. |
@@ -634,7 +633,7 @@ def myFunc(i): |
634 | 633 | assert "[11, 12, 13]" in content['data']['text/plain'] |
635 | 634 |
|
636 | 635 |
|
637 | | -@flaky(max_runs=3) |
| 636 | +@pytest.mark.flaky(max_runs=3) |
638 | 637 | @pytest.mark.skipif( |
639 | 638 | sys.platform == 'darwin' and sys.version_info[:2] == (3, 8), |
640 | 639 | reason="Fails on Mac with Python 3.8") |
@@ -681,7 +680,7 @@ def test_dask_multiprocessing(tmpdir): |
681 | 680 | assert content['found'] |
682 | 681 |
|
683 | 682 |
|
684 | | -@flaky(max_runs=3) |
| 683 | +@pytest.mark.flaky(max_runs=3) |
685 | 684 | def test_runfile(tmpdir): |
686 | 685 | """ |
687 | 686 | Test that runfile uses the proper name space for execution. |
@@ -756,7 +755,7 @@ def test_runfile(tmpdir): |
756 | 755 | assert not content['found'] |
757 | 756 |
|
758 | 757 |
|
759 | | -@flaky(max_runs=3) |
| 758 | +@pytest.mark.flaky(max_runs=3) |
760 | 759 | @pytest.mark.skipif( |
761 | 760 | sys.platform == 'darwin' and sys.version_info[:2] == (3, 8), |
762 | 761 | reason="Fails on Mac with Python 3.8") |
@@ -827,7 +826,7 @@ def test_np_threshold(kernel): |
827 | 826 | ) |
828 | 827 |
|
829 | 828 |
|
830 | | -@flaky(max_runs=3) |
| 829 | +@pytest.mark.flaky(max_runs=3) |
831 | 830 | @pytest.mark.skipif( |
832 | 831 | not TURTLE_ACTIVE, |
833 | 832 | reason="Doesn't work on non-interactive settings or Python without Tk") |
@@ -892,7 +891,7 @@ def test_turtle_launch(tmpdir): |
892 | 891 | assert content['found'] |
893 | 892 |
|
894 | 893 |
|
895 | | -@flaky(max_runs=3) |
| 894 | +@pytest.mark.flaky(max_runs=3) |
896 | 895 | def test_matplotlib_inline(kernel): |
897 | 896 | """Test that the default backend for our kernels is 'inline'.""" |
898 | 897 | # Command to start the kernel |
@@ -1181,7 +1180,7 @@ def test_locals_globals_in_pdb(kernel): |
1181 | 1180 | pdb_obj.curframe_locals = None |
1182 | 1181 |
|
1183 | 1182 |
|
1184 | | -@flaky(max_runs=3) |
| 1183 | +@pytest.mark.flaky(max_runs=3) |
1185 | 1184 | @pytest.mark.parametrize("backend", [None, 'inline', 'tk', 'qt']) |
1186 | 1185 | @pytest.mark.skipif( |
1187 | 1186 | os.environ.get('USE_CONDA') != 'true', |
@@ -1271,7 +1270,7 @@ def check_found(msg): |
1271 | 1270 | assert found |
1272 | 1271 |
|
1273 | 1272 |
|
1274 | | -@flaky(max_runs=3) |
| 1273 | +@pytest.mark.flaky(max_runs=3) |
1275 | 1274 | def test_debug_namespace(tmpdir): |
1276 | 1275 | """ |
1277 | 1276 | Test that the kernel uses the proper namespace while debugging. |
|
0 commit comments