Skip to content

Commit 80974d0

Browse files
committed
test(pytest): remove star imports to please ruff linter
1 parent 09b088d commit 80974d0

File tree

7 files changed

+41
-16
lines changed

7 files changed

+41
-16
lines changed

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sys
1615
import os
1716

1817
# If extensions (or modules to document with autodoc) are in another directory,

test/io/postgrest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import requests
1515
import requests_unixsocket
1616

17-
from config import *
17+
from config import POSTGREST_BIN, hpctixfile
1818

1919

2020
def sleep_until_postgrest_scache_reload():

test/io/test_big_schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import pytest
44

5-
from config import *
6-
from util import *
7-
from postgrest import *
5+
from config import defaultenv
6+
from util import parse_server_timings_header
7+
from postgrest import run
88

99

1010
def test_requests_with_resource_embedding_wait_for_schema_cache_reload(defaultenv):

test/io/test_cli.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,16 @@
77
from syrupy.extensions.json import SingleFileSnapshotExtension
88
import yaml
99

10-
from config import *
11-
from postgrest import *
10+
from config import (
11+
CONFIGSDIR,
12+
FIXTURES,
13+
POSTGREST_BIN,
14+
baseenv,
15+
defaultenv,
16+
get_admin_host_and_port_from_config,
17+
hpctixfile,
18+
)
19+
from postgrest import freeport, is_ipv6, metapostgrest, run, set_statement_timeout
1220

1321

1422
class ExtraNewLinesDumper(yaml.SafeDumper):

test/io/test_io.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,29 @@
88
import time
99
import pytest
1010

11-
from config import *
12-
from util import *
13-
from postgrest import *
11+
from config import (
12+
BASEDIR,
13+
CONFIGSDIR,
14+
FIXTURES,
15+
SECRET,
16+
baseenv,
17+
dburi,
18+
defaultenv,
19+
slow_schema_cache_env,
20+
)
21+
from util import Thread, authheader, jwtauthheader, parse_server_timings_header
22+
from postgrest import (
23+
freeport,
24+
is_ipv6,
25+
metapostgrest,
26+
reset_statement_timeout,
27+
run,
28+
set_statement_timeout,
29+
sleep_until_postgrest_config_reload,
30+
sleep_until_postgrest_full_reload,
31+
sleep_until_postgrest_scache_reload,
32+
wait_until_exit,
33+
)
1434

1535

1636
@pytest.mark.parametrize(

test/io/test_replica.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
"IO tests for PostgREST started on replicas"
22

3-
from config import *
4-
from util import *
5-
from postgrest import *
3+
from config import replicaenv
4+
from postgrest import run
65

76

87
def test_sanity_replica(replicaenv):

test/io/test_sanity.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
import pytest
44

5-
from config import *
6-
from util import *
7-
from postgrest import *
5+
from config import baseenv, defaultenv
6+
from postgrest import freeport, run
87

98

109
def test_port_connection(defaultenv):

0 commit comments

Comments
 (0)