]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: check unusual column names and namedtuple
authorJolbas <39026960+Jolbas@users.noreply.github.com>
Sun, 25 Sep 2022 12:32:42 +0000 (14:32 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 28 Sep 2022 00:45:59 +0000 (01:45 +0100)
tests/test_rows.py

index 62b15a764b8601812dfcde6f03aee91693b96c73..600a7e678976fa75897c064d5137a9b406cd4404 100644 (file)
@@ -56,6 +56,11 @@ def test_namedtuple_row(conn):
     assert r2.number == 1
     assert not cur.nextset()
     assert type(r1) is not type(r2)
+    cur.execute('select 1 as üåäö, 1 as _, 1 as "123"')
+    (r3,) = cur.fetchall()
+    assert "üåäö" in r3._fields
+    assert "f_" in r3._fields
+    assert "f123" in r3._fields
 
 
 def test_class_row(conn):