mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-08-14 08:56:00 +00:00

* adding file encoding * test file renamed with test_ prefix permitting unittest discovery * test configuration using dict using environment data for futur CI testing * test correction (using table t1) permitting unittest parallel testing now tests can be run using `python -m unittest -v` or for python 2 `python -m unittest discover -v`
16 lines
428 B
Python
16 lines
428 B
Python
#!/usr/bin/env python -O
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import os
|
|
|
|
def conf():
|
|
d = {
|
|
"user": os.environ.get('TEST_USER', 'root'),
|
|
"host": os.environ.get('TEST_HOST', 'localhost'),
|
|
"database": os.environ.get('TEST_DATABASE', 'testp'),
|
|
"port": int(os.environ.get('TEST_PORT', '3306'))
|
|
}
|
|
if os.environ.get('TEST_PASSWORD'):
|
|
d["password"] = os.environ.get('TEST_PASSWORD')
|
|
return d
|