mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-07-28 06:40:03 +00:00

Fixed various coding style stuff detected by flake8. Added .pre-commit-config.yaml: With command pre_commit install a hook for flake8 will be installed.
31 lines
834 B
Python
31 lines
834 B
Python
#!/usr/bin/env python -O
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import os
|
|
|
|
|
|
def glob():
|
|
dm = {
|
|
"module": os.environ.get('TEST_MODULE', 'mariadb'),
|
|
}
|
|
|
|
return dm
|
|
|
|
|
|
def conf():
|
|
d = {
|
|
"user": os.environ.get('TEST_DB_USER', 'root'),
|
|
"host": os.environ.get('TEST_DB_HOST', 'localhost'),
|
|
"database": os.environ.get('TEST_DB_DATABASE', 'testp'),
|
|
"port": int(os.environ.get('TEST_DB_PORT', '3306')),
|
|
}
|
|
if os.environ.get('TEST_REQUIRE_TLS'):
|
|
if os.environ.get('TEST_REQUIRE_TLS') == "1":
|
|
d["ssl"] = True
|
|
if os.environ.get('TEST_RESET_SESSION'):
|
|
reset = int(os.environ.get('TEST_RESET_SESSION', '1'))
|
|
d["pool_reset_connection"] = reset
|
|
if os.environ.get('TEST_DB_PASSWORD'):
|
|
d["password"] = os.environ.get('TEST_DB_PASSWORD')
|
|
return d
|