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