Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust skip decorators to avoid remaining dependency on nose #5932

Merged
merged 1 commit into from
Jan 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions notebook/tests/test_notebookapp_integration.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import os
import pytest
import stat
import subprocess
import sys
import time

from ipython_genutils.testing.decorators import skip_win32, onlyif
from notebook import DEFAULT_NOTEBOOK_PORT

from .launchnotebook import UNIXSocketNotebookTestBase
from ..utils import urlencode_unix_socket, urlencode_unix_socket_path


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


@onlyif(bool(os.environ.get('RUN_NB_INTEGRATION_TESTS', False)), 'for local testing')
@pytest.mark.skipif(not bool(os.environ.get('RUN_NB_INTEGRATION_TESTS', False)), reason="for local testing")
def test_stop_multi_integration():
"""Tests lifecycle behavior for mixed-mode server types w/ default ports.

Expand Down Expand Up @@ -137,7 +138,7 @@ def test_stop_multi_integration():
p3.wait()


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