def test_label_for_returns_none_by_default(self): parser = AddressParser(labels={}) self.assertEqual(None, parser.label_for(0xFFD2))
def test_label_for_returns_alternate_default(self): parser = AddressParser(labels={}) self.assertEqual('foo', parser.label_for(0xFFD2, 'foo'))
def test_label_for_returns_label(self): parser = AddressParser(labels={'chrout': 0xFFD2}) self.assertEqual('chrout', parser.label_for(0xFFD2))