]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
chore(tests): drop Python 2 check
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 3 Jan 2025 20:24:35 +0000 (21:24 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 3 Jan 2025 20:24:35 +0000 (21:24 +0100)
tests/dbapi20.py

index ba9be6302c6c3e78476a5be72794cc2d8bae9491..73a838fb3bbb88a270a2eeb1e337868d5856820f 100644 (file)
@@ -21,7 +21,6 @@ __author__ = 'Stuart Bishop <stuart@stuartbishop.net>'
 
 import unittest
 import time
-import sys
 from typing import Any
 
 
@@ -190,12 +189,8 @@ class DatabaseAPI20Test(unittest.TestCase):
     def test_Exceptions(self):
         # Make sure required exceptions exist, and are in the
         # defined hierarchy.
-        if sys.version[0] == '3': #under Python 3 StardardError no longer exists
-            self.assertTrue(issubclass(self.driver.Warning,Exception))
-            self.assertTrue(issubclass(self.driver.Error,Exception))
-        else:
-            self.assertTrue(issubclass(self.driver.Warning,StandardError))  # type: ignore[name-defined]
-            self.assertTrue(issubclass(self.driver.Error,StandardError))  # type: ignore[name-defined]
+        self.assertTrue(issubclass(self.driver.Warning,Exception))
+        self.assertTrue(issubclass(self.driver.Error,Exception))
 
         self.assertTrue(
             issubclass(self.driver.InterfaceError,self.driver.Error)