Skip to content

Commit

Permalink
updates from review
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Nov 15, 2020
1 parent a0640b3 commit da0fef5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@
from jupyter_server.transutils import trans, _
from jupyter_server.utils import secure_write, run_sync

# check for tornado 3.1.0
# the minimum viable tornado version: needs to be kept in sync with setup.py
MIN_TORNADO = (6, 1)

try:
import tornado
except ImportError as e:
raise ImportError(_("The Jupyter Server requires tornado >= 4.0")) from e
try:
version_info = tornado.version_info
except AttributeError as e:
raise ImportError(_("The Jupyter Server requires tornado >= 4.0, but you have < 1.1.0")) from e
if version_info < (4,0):
raise ImportError(_("The Jupyter Server requires tornado >= 4.0, but you have %s") % tornado.version)
assert tornado.version_info >= MIN_TORNADO
except (ImportError, AttributeError, AssertionError) as e: # pragma: no cover
raise ImportError(
_("The Jupyter Server requires tornado >=%s", ".".join(MIN_TORNADO))
) from e

from tornado import httpserver
from tornado import ioloop
Expand Down
Empty file removed tests/conftest.py
Empty file.
2 changes: 1 addition & 1 deletion tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def fetch_expect_200(jp_fetch, *path_parts):

async def fetch_expect_404(jp_fetch, *path_parts):
with pytest.raises(tornado.httpclient.HTTPClientError) as e:
r = await jp_fetch('files', *path_parts, method='GET')
await jp_fetch('files', *path_parts, method='GET')
assert expected_http_error(e, 404), [path_parts, e]


Expand Down

0 comments on commit da0fef5

Please sign in to comment.