| 1897 | await self.con.execute(r'DROP EXTENSION citext') |
| 1898 | |
| 1899 | async def test_enum_in_array(self): |
| 1900 | await self.con.execute(''' |
| 1901 | CREATE TYPE enum_t AS ENUM ('abc', 'def', 'ghi'); |
| 1902 | ''') |
| 1903 | |
| 1904 | try: |
| 1905 | result = await self.con.fetchrow('''SELECT $1::enum_t[];''', |
| 1906 | ['abc']) |
| 1907 | self.assertEqual(result, (['abc'],)) |
| 1908 | |
| 1909 | result = await self.con.fetchrow('''SELECT ARRAY[$1::enum_t];''', |
| 1910 | 'abc') |
| 1911 | |
| 1912 | self.assertEqual(result, (['abc'],)) |
| 1913 | |
| 1914 | finally: |
| 1915 | await self.con.execute(''' |
| 1916 | DROP TYPE enum_t; |
| 1917 | ''') |
| 1918 | |
| 1919 | async def test_enum_and_range(self): |
| 1920 | await self.con.execute(''' |