Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 29, 2022
1 parent 90d31a0 commit a5c8e88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions pytest_jupyter/jupyter_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
# The io_loop fixture is overidden in jupyter_core.py so it
# can be shared by other plugins that need it (e.g. jupyter_client.py).


@pytest.fixture
def jp_http_server(jp_io_loop, jp_http_server_port, jp_web_app):
"""Start a tornado HTTP server that listens on all available interfaces."""
Expand Down
7 changes: 2 additions & 5 deletions pytest_jupyter/pytest_tornasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ def pytest_pyfunc_call(pyfuncitem):
except KeyError:
loop = tornado.ioloop.IOLoop.current()

loop.run_sync(
lambda: pyfuncitem.obj(**testargs)
)
loop.run_sync(lambda: pyfuncitem.obj(**testargs))
return True


Expand All @@ -62,7 +60,6 @@ async def get_client():
yield context



class AsyncHTTPServerClient(SimpleAsyncHTTPClient):
def initialize(self, *, http_server=None):
super().initialize()
Expand All @@ -83,4 +80,4 @@ def get_http_port(self):
return sock.getsockname()[1]

def get_url(self, path):
return "%s://127.0.0.1:%s%s" % (self.get_protocol(), self.get_http_port(), path)
return "{}://127.0.0.1:{}{}".format(self.get_protocol(), self.get_http_port(), path)

0 comments on commit a5c8e88

Please sign in to comment.