]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Dropped unused function
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 3 Jul 2020 09:12:37 +0000 (21:12 +1200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 3 Jul 2020 09:12:37 +0000 (21:12 +1200)
tests/test_copy.py

index 993a1bb694af7fa5b09deee3b38d78a5cbf77f72..a2265ea8ab3533dfe6378be79ef4e492d254b0a8 100644 (file)
@@ -198,20 +198,3 @@ from copy_in group by 1, 2, 3
 def ensure_table(cur, tabledef, name="copy_in"):
     cur.execute(f"drop table if exists {name}")
     cur.execute(f"create table {name} ({tabledef})")
-
-
-def as_bytes(records):
-    out = []
-    for rin in records:
-        rout = []
-        for v in rin:
-            if v is None or isinstance(v, bytes):
-                rout.append(v)
-                continue
-            if not isinstance(v, str):
-                v = str(v)
-            if isinstance(v, str):
-                v = v.encode("utf8")
-            rout.append(v)
-        out.append(tuple(rout))
-    return out