8000 Add `collation` option and `set_character_set()` to Connection by methane · Pull Request #1119 · PyMySQL/PyMySQL · GitHub
[go: up one dir, main page]

Skip to content

Add collation option and set_character_set() to Connection #1119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix test
  • Loading branch information
methane committed May 24, 2023
commit 9c38074351673ecb83a4f24894925411c2187f0c
4 changes: 2 additions & 2 deletions pymysql/tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,9 @@ def test_set_character_set(self):
self.assertEqual(cur.fetchone(), ("latin1",))
self.assertEqual(con.encoding, "cp1252")

con.set_character_set("utf8mb3", "utf8mb3_general_ci")
con.set_character_set("utf8mb4", "utf8mb4_general_ci")
cur.execute("SELECT @@character_set_connection, @@collation_connection")
self.assertEqual(cur.fetchone(), ("utf8mb3", "utf8mb3_general_ci"))
self.assertEqual(cur.fetchone(), ("utf8mb4", "utf8mb4_general_ci"))
self.assertEqual(con.encoding, "utf8")

def test_largedata(self):
Expand Down
0