sqlite3-to-mysql
sqlite3-to-mysql copied to clipboard
respect charset and collation cli options
Codecov Report
Merging #43 (6565c48) into master (7933855) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #43 +/- ##
=======================================
Coverage 87.17% 87.17%
=======================================
Files 8 8
Lines 546 546
=======================================
Hits 476 476
Misses 70 70
Impacted Files | Coverage Δ | |
---|---|---|
sqlite3_to_mysql/transporter.py | 93.92% <ø> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us.
Looks like you'll need to fix this. Please run unit tests on your machine using tox
to speed things up.
I've passed tests locally for py27, py38 and py39:
125 passed, 2 xfailed, 32 xpassed, 7 warnings in 467.11s (0:07:47)
on CI here I see that tests trying to connect to MySQL using charset utf8mb4
and collation utf8mb4_general_ci
.tox/py39/lib/python3.9/site-packages/mysql/connector/connection.py:137: in __init__
self.connect(**kwargs)
__class__ = <class 'mysql.connector.connection.MySQLConnection'>
kwargs = {'charset': 'utf8mb4', 'collation': 'utf8mb4_general_ci', 'host': '0.0.0.0', 'password': 'testpass', ...}
self = <mysql.connector.connection.MySQLConnection object at 0x7f1ebd947bb0>
but test MySQL DB instance created with --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
I could try with --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
, but it is not clear for me from where utf8mb4_general_ci
is coming from...
The tests for Python <3.6
are probably succeeding because an older mysql-connector-python
is imported for Python <3.6
.
The charsets and encodings are from mysql/connector/charsets.
Check what version you have imported. It might require additional version-specific pinning.