(self, conn, args, want, enc)
| 287 | |
| 288 | @pytest.mark.parametrize("args, want, enc", _as_bytes_params) |
| 289 | def test_as_bytes(self, conn, args, want, enc): |
| 290 | want = want.encode(enc) |
| 291 | conn.execute(f"set client_encoding to {py2pgenc(enc).decode()}") |
| 292 | got = sql.Identifier(*args).as_bytes(conn) |
| 293 | assert isinstance(got, bytes) |
| 294 | assert got == want |
| 295 | |
| 296 | @pytest.mark.parametrize("args, want, enc", _as_bytes_params) |
| 297 | def test_as_bytes_no_conn(self, conn, args, want, enc): |