[testlib] provide ability to control schema/vreg reset using reset_schema/reset_vreg test class attributes
--- a/devtools/testlib.py Wed Feb 24 11:52:11 2010 +0100
+++ b/devtools/testlib.py Wed Feb 24 11:53:36 2010 +0100
@@ -75,6 +75,8 @@
repo.querier._rql_cache = {}
for source in repo.sources:
source.reset_caches()
+ if resetschema:
+ repo.set_schema(repo.config.load_schema(), resetvreg=resetvreg)
# email handling, to test emails sent by an application ########################
@@ -143,6 +145,7 @@
"""
appid = 'data'
configcls = devtools.ApptestConfiguration
+ reset_schema = reset_vreg = False # reset schema / vreg between tests
@classproperty
def config(cls):
@@ -213,7 +216,7 @@
@classmethod
def _refresh_repo(cls):
- refresh_repo(cls.repo)
+ refresh_repo(cls.repo, cls.reset_schema, cls.reset_vreg)
# global resources accessors ###############################################