Skip to content

Commit

Permalink
add test (but skip now)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Aug 23, 2024
1 parent da2b948 commit cd4515e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cymysql/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import datetime
import struct
import sys
import unittest


def u(x):
Expand Down Expand Up @@ -89,6 +90,17 @@ def test_datatypes(self):
finally:
c.execute("drop table test_datatypes")

@unittest.skip("MySQL9")
def test_vec(self):
import numpy as np
conn = self.connections[0]
c = conn.cursor()
c.execute("create table test_vec (id int unsigned auto_increment primary key, vec1 vector)")
c.execute("insert into test_vec(vec1) values (%s)", [np.array([2, 3, 5, 7])])
c.execute("select * from vec_table")
r = c.fetchall()
self.assertEqual([(np.array([2, 3, 5, 7], dtype=np.float32), )], r)

def test_dict(self):
""" test dict escaping """
conn = self.connections[0]
Expand Down

0 comments on commit cd4515e

Please sign in to comment.