def setUp(self): super(ObjectDBTest, self).setUp() self.project = testutils.sample_project() validation = _MockValidation() self.dbs = [ objectdb.ObjectDB(memorydb.MemoryDB(self.project), validation) ]
def _init_objectdb(self): dbtype = self.project.get_prefs().get('objectdb_type', None) persist = None if dbtype is not None: warnings.warn( '"objectdb_type" project config is deprecated;\n' 'Use "save_objectdb" instead in your project ' 'config file.\n(".ropeproject/config.py" by default)\n', DeprecationWarning) if dbtype != 'memory' and self.project.ropefolder is not None: persist = True self.validation = TextualValidation(self.to_pyobject) db = memorydb.MemoryDB(self.project, persist=persist) self.objectdb = objectdb.ObjectDB(db, self.validation)