class PyFilesystem(TestCase, FSTestCases): #class PyFilesystem(TestCase, FSTestCases, ThreadingTestCases): test_id = 1 def setUp(self): file_path = dirname(abspath(__file__)) # Load plugins Load_Dir(join(file_path, '..', 'plugins')) test_name = self.__class__.__name__ + '_' + str(self.test_id) self.db_file = join(file_path, '../..', test_name + '.sqlite') # self.db_file = ':memory:' self.ll_file = join(file_path, '../..', test_name + '.img') drive = open(self.ll_file, 'w+') # drive = StringIO() drive.write("\0" * 3 * 1024 * 1024) self.fs = FS(self.db_file, drive) def tearDown(self): self.fs.close() if self.db_file != ':memory:': remove(self.db_file) if not isinstance(self.ll_file, StringIO): remove(self.ll_file) self.__class__.test_id += 1
def setUp(self): file_path = dirname(abspath(__file__)) # Load plugins Load_Dir(join(file_path, '..', 'plugins')) test_name = self.__class__.__name__ + '_' + str(self.test_id) self.db_file = join(file_path, '../..', test_name + '.sqlite') # self.db_file = ':memory:' self.ll_file = join(file_path, '../..', test_name + '.img') drive = open(self.ll_file, 'w+') # drive = StringIO() drive.write("\0" * 3 * 1024 * 1024) self.fs = FS(self.db_file, drive)