mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-16 03:50:43 +08:00
black 20.8b1
This commit is contained in:
@ -131,7 +131,11 @@ def Time_or_None(s):
|
||||
|
||||
def Date_or_None(s):
|
||||
try:
|
||||
return date(int(s[:4]), int(s[5:7]), int(s[8:10]),) # year # month # day
|
||||
return date(
|
||||
int(s[:4]),
|
||||
int(s[5:7]),
|
||||
int(s[8:10]),
|
||||
) # year # month # day
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
|
@ -68,7 +68,7 @@ class DatabaseTest(unittest.TestCase):
|
||||
|
||||
def create_table(self, columndefs):
|
||||
|
||||
""" Create a table using a list of column definitions given in
|
||||
"""Create a table using a list of column definitions given in
|
||||
columndefs.
|
||||
|
||||
generator must be a function taking arguments (row_number,
|
||||
|
@ -5,7 +5,10 @@ from os import environ, path
|
||||
tests_path = path.dirname(__file__)
|
||||
conf_file = environ.get("TESTDB", "default.cnf")
|
||||
conf_path = path.join(tests_path, conf_file)
|
||||
connect_kwargs = dict(read_default_file=conf_path, read_default_group="MySQLdb-tests",)
|
||||
connect_kwargs = dict(
|
||||
read_default_file=conf_path,
|
||||
read_default_group="MySQLdb-tests",
|
||||
)
|
||||
|
||||
|
||||
def connection_kwargs(kwargs):
|
||||
|
@ -66,7 +66,7 @@ import time
|
||||
|
||||
|
||||
class DatabaseAPI20Test(unittest.TestCase):
|
||||
""" Test a database self.driver for DB API 2.0 compatibility.
|
||||
"""Test a database self.driver for DB API 2.0 compatibility.
|
||||
This implementation tests Gadfly, but the TestCase
|
||||
is structured so that other self.drivers can subclass this
|
||||
test case to ensure compiliance with the DB-API. It is
|
||||
@ -110,13 +110,13 @@ class DatabaseAPI20Test(unittest.TestCase):
|
||||
cursor.execute(self.ddl2)
|
||||
|
||||
def setUp(self):
|
||||
""" self.drivers should override this method to perform required setup
|
||||
"""self.drivers should override this method to perform required setup
|
||||
if any is necessary, such as creating the database.
|
||||
"""
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
""" self.drivers should override this method to perform required cleanup
|
||||
"""self.drivers should override this method to perform required cleanup
|
||||
if any is necessary, such as deleting the test database.
|
||||
The default drops the tables that may be created.
|
||||
"""
|
||||
@ -521,7 +521,7 @@ class DatabaseAPI20Test(unittest.TestCase):
|
||||
]
|
||||
|
||||
def _populate(self):
|
||||
""" Return a list of sql commands to setup the DB for the fetch
|
||||
"""Return a list of sql commands to setup the DB for the fetch
|
||||
tests.
|
||||
"""
|
||||
populate = [
|
||||
@ -710,7 +710,7 @@ class DatabaseAPI20Test(unittest.TestCase):
|
||||
con.close()
|
||||
|
||||
def help_nextset_setUp(self, cur):
|
||||
""" Should create a procedure called deleteme
|
||||
"""Should create a procedure called deleteme
|
||||
that returns two result sets, first the
|
||||
number of rows in booze then "name from booze"
|
||||
"""
|
||||
|
@ -161,7 +161,8 @@ class test_MySQLdb(dbapi20.DatabaseAPI20Test):
|
||||
pass # performed in test_MySQL_capabilities
|
||||
|
||||
def help_nextset_setUp(self, cur):
|
||||
""" Should create a procedure called deleteme
|
||||
"""
|
||||
Should create a procedure called deleteme
|
||||
that returns two result sets, first the
|
||||
number of rows in booze then "name from booze"
|
||||
"""
|
||||
|
Reference in New Issue
Block a user