]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: add module to test with template strings
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 29 Apr 2025 17:04:50 +0000 (19:04 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 8 Sep 2025 09:46:55 +0000 (11:46 +0200)
Skip module collection on Python version which don't support the syntax.

tests/conftest.py
tests/test_tstring.py [new file with mode: 0644]

index 4d7a4f6cb0466a2621a2247468286beea6a75a1e..4f22e82248bc0c7fcfa4251bfd0ec45eb324447f 100644 (file)
@@ -20,6 +20,10 @@ pytest_plugins = (
     "tests.pool.fix_pool",
 )
 
+collect_ignore: list[str] = []
+if sys.version_info[:2] < (3, 14):
+    collect_ignore.append("test_tstring.py")
+
 
 def pytest_configure(config):
     markers = [
diff --git a/tests/test_tstring.py b/tests/test_tstring.py
new file mode 100644 (file)
index 0000000..167c095
--- /dev/null
@@ -0,0 +1,2 @@
+def test_tstring():
+    t""