Example #1
0
 def filedb_test(self):
     from nosebase import TempDir
     tmp = TempDir()
     filename = tmp.subfile('nlmsa')
     self.db.write_binaries(filename)
     fdb=cnestedlist.IntervalFileDB(filename)
     assert fdb.find_overlap_list(0,10) == \
                      [(0, 10, 1, -110, -100), (5, 20, 2, -315, -300)]
     assert fdb.find_overlap_list(-11,-7) == \
                      [(-10, 0, 1, 100, 110), (-20, -5, 2, 300, 315)]
     tmp.__del__() # FORCE IT TO DELETE TEMPORARY DIRECTORY
Example #2
0
 def setup(self):
     from nosebase import TempDir
     tmp = TempDir()
     self.datagraph = mapping.Graph(filename=tmp.subfile('mygraph'),
                                    intKeys=True)
     self.tempdir = tmp # KEEP BOUND SO NOT DELETED UNTIL THIS TEST COMPLETED