Skip to content

Commit

Permalink
explicit charset for test_emoticons create table (mkleehammer#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
gordthompson committed Mar 3, 2019
1 parent fc3870d commit 4b7a316
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests2/mysqltests.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,9 @@ def test_emoticons(self):
#
# http://www.fileformat.info/info/unicode/char/1f31c/index.htm

v = "x \U0001F31C z"
v = u"x \U0001F31C z"

self.cursor.execute("create table t1(s varchar(100))")
self.cursor.execute("CREATE TABLE t1(s varchar(100)) DEFAULT CHARSET=utf8mb4")
self.cursor.execute("insert into t1 values (?)", v)

result = self.cursor.execute("select s from t1").fetchone()[0]
Expand Down
2 changes: 1 addition & 1 deletion tests3/mysqltests.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def test_emoticons(self):

v = "x \U0001F31C z"

self.cursor.execute("create table t1(s varchar(100))")
self.cursor.execute("CREATE TABLE t1(s varchar(100)) DEFAULT CHARSET=utf8mb4")
self.cursor.execute("insert into t1 values (?)", v)

result = self.cursor.execute("select s from t1").fetchone()[0]
Expand Down

0 comments on commit 4b7a316

Please sign in to comment.