From 08af5df02db2f9afff4cb133907f25fbb90db801 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Thu, 23 Mar 2023 09:52:39 +0100 Subject: [PATCH] tests: skip test_sql::test_invalid_name if not a super-user Creating a base type, as done in that test, requires being a superuser. --- tests/test_sql.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_sql.py b/tests/test_sql.py index 42b6c63ce..b1ec8d85d 100644 --- a/tests/test_sql.py +++ b/tests/test_sql.py @@ -366,6 +366,8 @@ class TestLiteral: @pytest.mark.crdb_skip("composite") # create type, actually @pytest.mark.parametrize("name", ["a-b", f"{eur}", "order", "foo bar"]) def test_invalid_name(self, conn, name): + if conn.info.parameter_status("is_superuser") != "on": + pytest.skip("not a superuser") conn.execute( f""" set client_encoding to utf8; -- 2.47.3