C remove no more used copy_schema
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 31 Jul 2009 20:05:33 +0200
changeset 2591 287e43c6ed81
parent 2590 45d5f2d73561
child 2592 c97c4b56e6a0
C remove no more used copy_schema
devtools/apptest.py
server/test/unittest_hooks.py
server/test/unittest_migractions.py
--- a/devtools/apptest.py	Fri Jul 31 19:43:18 2009 +0200
+++ b/devtools/apptest.py	Fri Jul 31 20:05:33 2009 +0200
@@ -457,7 +457,6 @@
     pactionsdict = EnvBasedTC.pactionsdict.im_func
 
     # default test setup and teardown #########################################
-    copy_schema = False
 
     def _prepare(self):
         MAILBOX[:] = [] # reset mailbox
@@ -470,16 +469,6 @@
         self.__close = repo.close
         self.cnxid = self.cnx.sessionid
         self.session = repo._sessions[self.cnxid]
-        if self.copy_schema:
-            # XXX copy schema since hooks may alter it and it may be not fully
-            #     cleaned (missing some schema synchronization support)
-            try:
-                origschema = repo.__schema
-            except AttributeError:
-                repo.__schema = origschema = repo.schema
-            repo.schema = deepcopy(origschema)
-            repo.set_schema(repo.schema) # reset hooks
-            repo.vreg.update_schema(repo.schema)
         self.cnxs = []
         # reset caches, they may introduce bugs among tests
         repo._type_source_cache = {}
--- a/server/test/unittest_hooks.py	Fri Jul 31 19:43:18 2009 +0200
+++ b/server/test/unittest_hooks.py	Fri Jul 31 20:05:33 2009 +0200
@@ -246,7 +246,6 @@
 
 
 class SchemaModificationHooksTC(RepositoryBasedTC):
-    #copy_schema = True
 
     def setUp(self):
         if not hasattr(self, '_repo'):
--- a/server/test/unittest_migractions.py	Fri Jul 31 19:43:18 2009 +0200
+++ b/server/test/unittest_migractions.py	Fri Jul 31 20:05:33 2009 +0200
@@ -23,7 +23,6 @@
 
 
 class MigrationCommandsTC(RepositoryBasedTC):
-    copy_schema = False
 
     def setUp(self):
         if not hasattr(self, '_repo'):