| 1851 | await self.con.execute(r'DROP EXTENSION citext') |
| 1852 | |
| 1853 | async def test_enum_in_array(self): |
| 1854 | await self.con.execute(''' |
| 1855 | CREATE TYPE enum_t AS ENUM ('abc', 'def', 'ghi'); |
| 1856 | ''') |
| 1857 | |
| 1858 | try: |
| 1859 | result = await self.con.fetchrow('''SELECT $1::enum_t[];''', |
| 1860 | ['abc']) |
| 1861 | self.assertEqual(result, (['abc'],)) |
| 1862 | |
| 1863 | result = await self.con.fetchrow('''SELECT ARRAY[$1::enum_t];''', |
| 1864 | 'abc') |
| 1865 | |
| 1866 | self.assertEqual(result, (['abc'],)) |
| 1867 | |
| 1868 | finally: |
| 1869 | await self.con.execute(''' |
| 1870 | DROP TYPE enum_t; |
| 1871 | ''') |
| 1872 | |
| 1873 | async def test_enum_and_range(self): |
| 1874 | await self.con.execute(''' |