Skip to content

Commit 5b05099

Browse files
committed
Improving Pytest and Tox settings.
1 parent 92e9f20 commit 5b05099

20 files changed

+10
-43
lines changed

awswrangler/s3/_write_parquet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def to_parquet( # pylint: disable=too-many-arguments,too-many-locals
339339
# Evaluating dtype
340340
catalog_table_input: Optional[Dict[str, Any]] = None
341341
if database is not None and table is not None:
342-
catalog_table_input: Optional[Dict[str, Any]] = catalog._get_table_input( # pylint: disable=protected-access
342+
catalog_table_input = catalog._get_table_input( # pylint: disable=protected-access
343343
database=database, table=table, boto3_session=session, catalog_id=catalog_id
344344
)
345345
df = _apply_dtype(df=df, dtype=dtype, catalog_table_input=catalog_table_input, mode=mode)

awswrangler/s3/_write_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def to_csv( # pylint: disable=too-many-arguments,too-many-locals
334334
# Evaluating dtype
335335
catalog_table_input: Optional[Dict[str, Any]] = None
336336
if database is not None and table is not None:
337-
catalog_table_input: Optional[Dict[str, Any]] = catalog._get_table_input( # pylint: disable=protected-access
337+
catalog_table_input = catalog._get_table_input( # pylint: disable=protected-access
338338
database=database, table=table, boto3_session=session, catalog_id=catalog_id
339339
)
340340
df = _apply_dtype(df=df, dtype=dtype, catalog_table_input=catalog_table_input, mode=mode)

pytest.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[pytest]
2+
log_cli=False
3+
filterwarnings =
4+
ignore::DeprecationWarning
5+
addopts =
6+
--log-cli-format "[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s"
7+
--verbose
8+
--capture=sys

setup.cfg

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@ license_files =
77
[flake8]
88
max-line-length = 120
99

10-
[tool:pytest]
11-
log_cli=False
12-
filterwarnings =
13-
ignore::DeprecationWarning
14-
addopts =
15-
--log-cli-format "[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s"
16-
--verbose
17-
--capture=sys
18-
1910
[isort]
2011
multi_line_output=3
2112
include_trailing_comma=True

tests/test__routines.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
import awswrangler as wr
77

8-
logging.basicConfig(level=logging.INFO, format="[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s")
98
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
10-
logging.getLogger("botocore.credentials").setLevel(logging.CRITICAL)
119

1210

1311
@pytest.mark.parametrize("use_threads", [True, False])

tests/test_athena.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
get_time_str_with_random_suffix,
2222
)
2323

24-
logging.basicConfig(level=logging.INFO, format="[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s")
2524
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
26-
logging.getLogger("botocore.credentials").setLevel(logging.CRITICAL)
2725

2826

2927
def test_athena_ctas(path, path2, path3, glue_table, glue_table2, glue_database, kms_key):

tests/test_athena_cache.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
from ._utils import ensure_athena_query_metadata
99

10-
logging.basicConfig(level=logging.INFO, format="[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s")
1110
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
12-
logging.getLogger("botocore.credentials").setLevel(logging.CRITICAL)
1311

1412

1513
def test_athena_cache(path, glue_database, glue_table, workgroup1):

tests/test_athena_csv.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
from ._utils import ensure_data_types_csv, get_df_csv
99

10-
logging.basicConfig(level=logging.INFO, format="[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s")
1110
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
12-
logging.getLogger("botocore.credentials").setLevel(logging.CRITICAL)
1311

1412

1513
@pytest.mark.parametrize("use_threads", [True, False])

tests/test_athena_parquet.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010
from ._utils import ensure_data_types, get_df, get_df_cast, get_df_list
1111

12-
logging.basicConfig(level=logging.INFO, format="[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s")
1312
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
14-
logging.getLogger("botocore.credentials").setLevel(logging.CRITICAL)
1513

1614

1715
def test_parquet_catalog(path, path2, glue_table, glue_table2, glue_database):

tests/test_athena_projection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
from ._utils import dt, ts
88

9-
logging.basicConfig(level=logging.INFO, format="[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s")
109
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
11-
logging.getLogger("botocore.credentials").setLevel(logging.CRITICAL)
1210

1311

1412
def test_to_parquet_projection_integer(glue_database, glue_table, path):

0 commit comments

Comments
 (0)