Changeset 822 for trunk


Ignore:
Timestamp:
Feb 5, 2016, 12:05:45 PM (4 years ago)
Author:
cito
Message:

Make version available as version in both modules

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/pg.py

    r821 r822  
    3131
    3232from _pg import *
     33
     34__version__ = version
    3335
    3436import select
  • trunk/pgdb.py

    r821 r822  
    6767
    6868from _pg import *
     69
     70__version__ = version
    6971
    7072from datetime import date, time, datetime, timedelta
  • trunk/tests/test_classic_functions.py

    r817 r822  
    10621062        match = re.match(re_version, v, re.X)
    10631063        self.assertIsNotNone(match)
     1064        self.assertEqual(pg.__version__, v)
    10641065
    10651066
  • trunk/tests/test_dbapi20.py

    r821 r822  
    8484    def tearDown(self):
    8585        dbapi20.DatabaseAPI20Test.tearDown(self)
     86
     87    def testVersion(self):
     88        v = pgdb.version
     89        self.assertIsInstance(v, str)
     90        self.assertIn('.', v)
     91        self.assertEqual(pgdb.__version__, v)
    8692
    8793    def test_callproc_no_params(self):
Note: See TracChangeset for help on using the changeset viewer.