def test_store_result_twice(self):
        bucket = Bucket(self.workdir)
        bucket.storeResult(self.src_path1, self.result_path1, suffix='foo')

        listing = os.listdir(os.path.join(self.workdir, 'results'))
        self.assertEqual(listing, ['result_1__foo'])

        bucket.storeResult(self.src_path1, self.result_path1)
        bucket.storeResult(self.src_path1, self.result_path2)
        bucket.storeResult(self.src_path1, self.result_path1)

        listing = sorted(os.listdir(os.path.join(self.workdir, 'results')))
        self.assertEqual(listing, ['result_1__foo', 'result_1_default'])

        curr_num = bucket.getCurrentNum()
        self.assertEqual(curr_num, 1)
        return
 def test_curr_num(self):
     bucket = Bucket(self.workdir)
     self.assertEqual(bucket.getCurrentNum(), 0)
     bucket.setCurrentNum(12)
     self.assertEqual(bucket.getCurrentNum(), 12)
     return