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

Add more coverage #1069

Merged
merged 15 commits into from
Nov 17, 2022
Prev Previous commit
Next Next commit
try uuid
blink1073 committed Nov 12, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 05d04c4d5a4d28ca2560d4edeec8bde0f409d220
1 change: 0 additions & 1 deletion jupyter_server/files/handlers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Serve files directly from the ContentsManager."""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import json
import mimetypes
from base64 import decodebytes
from typing import List
3 changes: 2 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
import socket
import subprocess
import sys
import uuid
import warnings
from pathlib import Path
from unittest.mock import patch
@@ -116,7 +117,7 @@ async def foo():
@pytest.mark.skipif(os.name != "posix", reason="Requires unix sockets")
def test_unix_socket_in_use(tmp_path):
root_tmp_dir = Path("/tmp").resolve()
server_address = os.path.join(root_tmp_dir, os.path.basename(tmp_path))
server_address = os.path.join(root_tmp_dir, uuid.uuid4().hex)
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.bind(server_address)
sock.listen(0)