Skip to content

Commit

Permalink
Reformatted files using black and isort
Browse files Browse the repository at this point in the history
  • Loading branch information
mdesmet committed Sep 1, 2022
1 parent 8e88520 commit 8b64705
Show file tree
Hide file tree
Showing 25 changed files with 764 additions and 841 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re
import textwrap

from setuptools import setup, find_packages
from setuptools import find_packages, setup

_version_re = re.compile(r"__version__\s+=\s+(.*)")

Expand Down
26 changes: 9 additions & 17 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
from uuid import uuid4

import click
import trino.logging
import pytest
from trino.client import TrinoQuery, TrinoRequest, ClientSession
from trino.constants import DEFAULT_PORT

import trino.logging
from trino.client import ClientSession, TrinoQuery, TrinoRequest
from trino.constants import DEFAULT_PORT

logger = trino.logging.get_logger(__name__)

Expand Down Expand Up @@ -68,8 +68,8 @@ def wait_for_trino_workers(host, port, timeout=180):
host=host,
port=port,
client_session=ClientSession(
user="test_fixture"
)
user="test_fixture",
),
)
sql = "SELECT state FROM system.runtime.nodes"
t0 = time.time()
Expand Down Expand Up @@ -116,9 +116,7 @@ def start_trino_and_wait(image_tag=None):
if host:
port = os.environ.get("TRINO_RUNNING_PORT", DEFAULT_PORT)
else:
container_id, proc, host, port = start_local_trino_server(
image_tag
)
container_id, proc, host, port = start_local_trino_server(image_tag)

print("trino.server.hostname {}".format(host))
print("trino.server.port {}".format(port))
Expand All @@ -135,9 +133,7 @@ def stop_trino(container_id, proc):

def find_images(name):
assert name
output = subprocess.check_output(
["docker", "images", "--format", "{{.Repository}}:{{.Tag}}", name]
)
output = subprocess.check_output(["docker", "images", "--format", "{{.Repository}}:{{.Tag}}", name])
return [line.decode() for line in output.splitlines()]


Expand Down Expand Up @@ -167,9 +163,7 @@ def cli():
pass


@click.option(
"--cache/--no-cache", default=True, help="enable/disable Docker build cache"
)
@click.option("--cache/--no-cache", default=True, help="enable/disable Docker build cache")
@click.command()
def trino_server():
container_id, _, _, _ = start_trino_and_wait()
Expand Down Expand Up @@ -198,9 +192,7 @@ def trino_cli(container_id=None):

@cli.command("list")
def list_():
subprocess.check_call(
["docker", "ps", "--filter", "name=trino-python-client-tests-"]
)
subprocess.check_call(["docker", "ps", "--filter", "name=trino-python-client-tests-"])


@cli.command()
Expand Down
Loading

0 comments on commit 8b64705

Please sign in to comment.