Skip to content

Commit 8d0af52

Browse files
authored
Adjust skip decorators to avoid remaining dependency on nose (#5932)
1 parent 245ca66 commit 8d0af52

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

notebook/tests/test_notebookapp_integration.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import os
2+
import pytest
23
import stat
34
import subprocess
5+
import sys
46
import time
57

6-
from ipython_genutils.testing.decorators import skip_win32, onlyif
78
from notebook import DEFAULT_NOTEBOOK_PORT
89

910
from .launchnotebook import UNIXSocketNotebookTestBase
1011
from ..utils import urlencode_unix_socket, urlencode_unix_socket_path
1112

1213

13-
@skip_win32
14+
@pytest.mark.skipif(sys.platform == "win32", reason="do not run on windows")
1415
def test_shutdown_sock_server_integration():
1516
sock = UNIXSocketNotebookTestBase.sock
1617
url = urlencode_unix_socket(sock).encode()
@@ -87,7 +88,7 @@ def _ensure_stopped(check_msg='There are no running servers'):
8788
raise AssertionError('expected all servers to be stopped')
8889

8990

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")
9192
def test_stop_multi_integration():
9293
"""Tests lifecycle behavior for mixed-mode server types w/ default ports.
9394
@@ -137,7 +138,7 @@ def test_stop_multi_integration():
137138
p3.wait()
138139

139140

140-
@skip_win32
141+
@pytest.mark.skipif(sys.platform == "win32", reason="do not run on windows")
141142
def test_launch_socket_collision():
142143
"""Tests UNIX socket in-use detection for lifecycle correctness."""
143144
sock = UNIXSocketNotebookTestBase.sock

0 commit comments

Comments
 (0)