mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Make pyscopg2 version parsing more robust (#1052)
non-released version can have unparsable suffixes, for example 2.8.3.dev0
This commit is contained in:
@@ -159,5 +159,5 @@ class TestPatroni(unittest.TestCase):
|
||||
def test_check_psycopg2(self):
|
||||
with patch.object(builtins, '__import__', Mock(side_effect=ImportError)):
|
||||
self.assertRaises(SystemExit, check_psycopg2)
|
||||
with patch.object(psycopg2, '__version__', return_value='2.5.3 a b c'):
|
||||
with patch.object(psycopg2, '__version__', return_value='2.5.3.dev1 a b c'):
|
||||
self.assertRaises(SystemExit, check_psycopg2)
|
||||
|
||||
Reference in New Issue
Block a user