From f3c298d3c9b9b4bbe6460fa5c3e79bb5488c0bf4 Mon Sep 17 00:00:00 2001 From: Gord Thompson Date: Tue, 26 Feb 2019 06:15:18 -0700 Subject: [PATCH] update usage information in mysqltests.py --- tests2/mysqltests.py | 14 +++++++++----- tests3/mysqltests.py | 11 +++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/tests2/mysqltests.py b/tests2/mysqltests.py index be0a3d8e..cf1f2fa6 100755 --- a/tests2/mysqltests.py +++ b/tests2/mysqltests.py @@ -4,14 +4,18 @@ usage = """\ usage: %prog [options] connection_string -Unit tests for MySQL. To use, pass a connection string as the parameter. The tests will create and drop tables t1 and -t2 as necessary. The default installation of mysql allows you to connect locally with no password and already contains -a 'test' database, so you can probably use the following. (Update the driver name as appropriate.) - - ./mysqltests DRIVER={MySQL};DATABASE=test +Unit tests for MySQL. To use, pass a connection string as the parameter. +The tests will create and drop tables t1 and t2 as necessary. These tests use the pyodbc library from the build directory, not the version installed in your Python directories. You must run `python setup.py build` before running these tests. + +You can also put the connection string into a tmp/setup.cfg file like so: + + [mysqltests] + connection-string=DRIVER=MySQL ODBC 8.0 Unicode Driver;charset=utf8mb4;SERVER=localhost;DATABASE=pyodbc;UID=root;PWD=usbw + +Note: Include charset=utf8mb4 in the connection string so the high-Unicode tests won't fail. """ import sys, os, re diff --git a/tests3/mysqltests.py b/tests3/mysqltests.py index ff8a349f..7a00baee 100755 --- a/tests3/mysqltests.py +++ b/tests3/mysqltests.py @@ -4,11 +4,8 @@ usage = """\ usage: %prog [options] connection_string -Unit tests for MySQL. To use, pass a connection string as the parameter. The tests will create and drop tables t1 and -t2 as necessary. The default installation of mysql allows you to connect locally with no password and already contains -a 'test' database, so you can probably use the following. (Update the driver name as appropriate.) - - ./mysqltests DRIVER={MySQL};DATABASE=test +Unit tests for MySQL. To use, pass a connection string as the parameter. +The tests will create and drop tables t1 and t2 as necessary. These tests use the pyodbc library from the build directory, not the version installed in your Python directories. You must run `python setup.py build` before running these tests. @@ -16,7 +13,9 @@ You can also put the connection string into a tmp/setup.cfg file like so: [mysqltests] - connection-string=DRIVER={MySQL};SERVER=localhost;UID=uid;PWD=pwd;DATABASE=db + connection-string=DRIVER=MySQL ODBC 8.0 Unicode Driver;charset=utf8mb4;SERVER=localhost;DATABASE=pyodbc;UID=root;PWD=usbw + +Note: Include charset=utf8mb4 in the connection string so the high-Unicode tests won't fail. """ import sys, os, re