|
1 | 1 | import os
|
| 2 | +import pytest |
2 | 3 | import stat
|
3 | 4 | import subprocess
|
| 5 | +import sys |
4 | 6 | import time
|
5 | 7 |
|
6 |
| -from ipython_genutils.testing.decorators import skip_win32, onlyif |
7 | 8 | from notebook import DEFAULT_NOTEBOOK_PORT
|
8 | 9 |
|
9 | 10 | from .launchnotebook import UNIXSocketNotebookTestBase
|
10 | 11 | from ..utils import urlencode_unix_socket, urlencode_unix_socket_path
|
11 | 12 |
|
12 | 13 |
|
13 |
| -@skip_win32 |
| 14 | +@pytest.mark.skipif(sys.platform == "win32", reason="do not run on windows") |
14 | 15 | def test_shutdown_sock_server_integration():
|
15 | 16 | sock = UNIXSocketNotebookTestBase.sock
|
16 | 17 | url = urlencode_unix_socket(sock).encode()
|
@@ -87,7 +88,7 @@ def _ensure_stopped(check_msg='There are no running servers'):
|
87 | 88 | raise AssertionError('expected all servers to be stopped')
|
88 | 89 |
|
89 | 90 |
|
90 |
| -@onlyif(bool(os.environ.get('RUN_NB_INTEGRATION_TESTS', False)), 'for local testing') |
| 91 | +@pytest.mark.skipif(not bool(os.environ.get('RUN_NB_INTEGRATION_TESTS', False)), reason="for local testing") |
91 | 92 | def test_stop_multi_integration():
|
92 | 93 | """Tests lifecycle behavior for mixed-mode server types w/ default ports.
|
93 | 94 |
|
@@ -137,7 +138,7 @@ def test_stop_multi_integration():
|
137 | 138 | p3.wait()
|
138 | 139 |
|
139 | 140 |
|
140 |
| -@skip_win32 |
| 141 | +@pytest.mark.skipif(sys.platform == "win32", reason="do not run on windows") |
141 | 142 | def test_launch_socket_collision():
|
142 | 143 | """Tests UNIX socket in-use detection for lifecycle correctness."""
|
143 | 144 | sock = UNIXSocketNotebookTestBase.sock
|
|
0 commit comments