Beispiel #1
0
 def setUp(self):
     self.cfg = Config()
     self.cfg.popcon_index = "test_data/.sample_pxi"
     self.cfg.popcon_dir = "test_data/popcon_dir"
     self.cfg.clusters_dir = "test_data/clusters_dir"
     # build old index for all tests
     shutil.rmtree(self.cfg.popcon_index,1)
     self.assertFalse(os.path.exists(self.cfg.popcon_index))
     # local variable, index will be closed before test
     pxi = PopconXapianIndex(self.cfg)
     self.assertEqual(pxi.get_metadata("old"),"")
     pxi.set_metadata("old","true")