Commits

Rufus Pollock  committed 2352cc3

[test/sqlalchemy][xs]: remove special casing for sqlalchemy <= 0.4.99 from tests (demo stuff).

  • Participants
  • Parent commits 58fdbdc
  • Branches changeset

Comments (0)

Files changed (2)

File vdm/test/sqlalchemy/demo.py

 # both options now work
 # Session = scoped_session(sessionmaker(autoflush=False, transactional=True))
 # this is the more testing one ...
-if sqla_version <= '0.4.99':
-    Session = scoped_session(sessionmaker(autoflush=True, transactional=True))
-else:
-    Session = scoped_session(sessionmaker(autoflush=True,
-                                          expire_on_commit=False,
-                                          autocommit=False))
+Session = scoped_session(
+            sessionmaker(autoflush=True,
+            expire_on_commit=False,
+            autocommit=False
+            ))
 
 # mapper = Session.mapper
 from sqlalchemy.orm import mapper

File vdm/test/sqlalchemy/test_demo.py

 import vdm.sqlalchemy
 from demo import *
 
-from sqlalchemy import __version__ as sqav
-if sqav.startswith("0.4"):
-    _clear = Session.clear
-else:
-    _clear = Session.expunge_all
+_clear = Session.expunge_all
     
 class Test_01_SQLAlchemySession:
     @classmethod