1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #10842 -- Corrected parsing of version numbers for PostgreSQL 8.4beta series. Thanks to hgdeoro for the report and fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2009-05-10 09:22:06 +00:00
parent 5663258de1
commit b97178f7ec
5 changed files with 49 additions and 24 deletions

View File

@@ -21,7 +21,29 @@ class Callproc(unittest.TestCase):
def connection_created_test(sender, **kwargs):
print 'connection_created signal'
__test__ = {'API_TESTS': ''}
__test__ = {'API_TESTS': """
# Check Postgres version parsing
>>> from django.db.backends.postgresql import version as pg_version
>>> pg_version._parse_version("PostgreSQL 8.3.1 on i386-apple-darwin9.2.2, compiled by GCC i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5478)")
(8, 3, 1)
>>> pg_version._parse_version("PostgreSQL 8.3.6")
(8, 3, 6)
>>> pg_version._parse_version("PostgreSQL 8.3")
(8, 3, None)
>>> pg_version._parse_version("EnterpriseDB 8.3")
(8, 3, None)
>>> pg_version._parse_version("PostgreSQL 8.3 beta4")
(8, 3, None)
>>> pg_version._parse_version("PostgreSQL 8.4beta1")
(8, 4, None)
"""}
# Unfortunately with sqlite3 the in-memory test database cannot be
# closed, and so it cannot be re-opened during testing, and so we