mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Add test for libpq_version
This commit is contained in:
parent
4bb6f9cef2
commit
ffd98a82c0
|
@ -320,6 +320,15 @@ import _psycopg
|
|||
self.assertEqual(0, proc.returncode)
|
||||
|
||||
|
||||
class TestVersionDiscovery(unittest.TestCase):
|
||||
def test_libpq_version(self):
|
||||
self.assertTrue(type(psycopg2.__libpq_version__) is int)
|
||||
try:
|
||||
self.assertTrue(type(psycopg2.extensions.libpq_version()) is int)
|
||||
except NotSupportedError:
|
||||
self.assertTrue(psycopg2.__libpq_version__ < 90100)
|
||||
|
||||
|
||||
def test_suite():
|
||||
return unittest.TestLoader().loadTestsFromName(__name__)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user