Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/k/a/kamaki-0.12.10/kamaki/cli/test.py   kamaki(Download)
    def test_get(self):
        history = self.HCLASS(self.file.name)
        self.assertEqual(history.get(), [])
 
        sample_history = (
    def test_add(self):
        history = self.HCLASS(self.file.name)
        some_strings = ('a brick', 'two bricks', 'another brick', 'A wall!')
        for i, line in enumerate(some_strings):
            history.add(line)
        self.file.seek(0)
        self.assertEqual(self.file.read(), content)
        history = self.HCLASS(self.file.name)
        history.clean()
        self.file.seek(0)
        self.file.flush()
 
        history = self.HCLASS(self.file.name)
        self.assertRaises(ValueError, history.retrieve, 'must be number')
        self.assertRaises(TypeError, history.retrieve, [1, 2, 3])