def test_pushPop(self): push_tag('foo', 1) pop_tag() push_tag('foo', 1) push_tag('bar', 2) self.assertListEqual([('foo', 1), ('bar', 2)], get_tags()) pop_tag() pop_tag() self.assertListEqual([], get_tags())
def test_pushPopTooMuch(self): with self.assertRaises(IndexError): push_tag('foo', 1) pop_tag() pop_tag()