Esempio n. 1
0
class BufstackTest(unittest.TestCase):
    def setUp(self):
        self.bufstack = BufferStackDict()
        self.max_rand_buffers = 200   

    def push_rand_bufs(self, num_rand_buffers):
        for i in MockBuffer.RandBuffers(num_rand_buffers, self.max_rand_buffers):
            self.bufstack.push(MockWindow(-1), i)
Esempio n. 2
0
class BufstackTest(unittest.TestCase):
    def setUp(self):
        self.bufstack = BufferStackDict()
        self.max_rand_buffers = 200   
        self.mock_window = MockWindow(-1)

    
    #return a randomly size list containing buffers with random numbers
    #(random length and random content)
    def get_rand_buffers_list(self):
        return MockBuffer.RandBuffers(randint(0, self.max_rand_buffers), self.max_rand_buffers)

    def push_rand_bufs(self, num_rand_buffers):
        for i in MockBuffer.RandBuffers(num_rand_buffers, self.max_rand_buffers):
            self.bufstack.push(self.mock_window, i)

    def get_mock_window_bufs(self):
        return self.bufstack.public_get_stack_for_window(self.mock_window)
Esempio n. 3
0
 def setUp(self):
     self.bufstack = BufferStackDict()
     self.max_rand_buffers = 200   
     self.mock_window = MockWindow(-1)
Esempio n. 4
0
 def setUp(self):
     self.bufstack = BufferStackDict()
     self.max_rand_buffers = 200