1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-11-19 06:31:08 +00:00

Replace deprecated assertEquals() with assertEqual()

This commit is contained in:
Mike Naberezny 2011-02-06 07:30:09 +08:00 committed by BigEd
parent f4fba9b06a
commit 27367da0f8
3 changed files with 1890 additions and 1890 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,7 @@ class AddressParserTests(unittest.TestCase):
def test_number_label(self): def test_number_label(self):
parser = AddressParser() parser = AddressParser()
parser.labels = {'foo': 0xC000} parser.labels = {'foo': 0xC000}
self.assertEquals(0xC000, parser.number('foo')) self.assertEqual(0xC000, parser.number('foo'))
def test_number_bad_label(self): def test_number_bad_label(self):
parser = AddressParser() parser = AddressParser()
@ -54,40 +54,40 @@ class AddressParserTests(unittest.TestCase):
def test_number_label_hex_offset(self): def test_number_label_hex_offset(self):
parser = AddressParser() parser = AddressParser()
parser.labels = {'foo': 0xC000} parser.labels = {'foo': 0xC000}
self.assertEquals(0xC003, parser.number('foo+$3')) self.assertEqual(0xC003, parser.number('foo+$3'))
self.assertEquals(0xBFFD, parser.number('foo-$3')) self.assertEqual(0xBFFD, parser.number('foo-$3'))
self.assertEquals(0xC003, parser.number('foo + $3')) self.assertEqual(0xC003, parser.number('foo + $3'))
self.assertEquals(0xBFFD, parser.number('foo - $3')) self.assertEqual(0xBFFD, parser.number('foo - $3'))
def test_number_label_dec_offset(self): def test_number_label_dec_offset(self):
parser = AddressParser() parser = AddressParser()
parser.labels = {'foo': 0xC000} parser.labels = {'foo': 0xC000}
self.assertEquals(0xC003, parser.number('foo++3')) self.assertEqual(0xC003, parser.number('foo++3'))
self.assertEquals(0xBFFD, parser.number('foo-+3')) self.assertEqual(0xBFFD, parser.number('foo-+3'))
self.assertEquals(0xC003, parser.number('foo + +3')) self.assertEqual(0xC003, parser.number('foo + +3'))
self.assertEquals(0xBFFD, parser.number('foo - +3')) self.assertEqual(0xBFFD, parser.number('foo - +3'))
def test_number_label_bin_offset(self): def test_number_label_bin_offset(self):
parser = AddressParser() parser = AddressParser()
parser.labels = {'foo': 0xC000} parser.labels = {'foo': 0xC000}
self.assertEquals(0xC003, parser.number('foo+%00000011')) self.assertEqual(0xC003, parser.number('foo+%00000011'))
self.assertEquals(0xBFFD, parser.number('foo-%00000011')) self.assertEqual(0xBFFD, parser.number('foo-%00000011'))
self.assertEquals(0xC003, parser.number('foo + %00000011')) self.assertEqual(0xC003, parser.number('foo + %00000011'))
self.assertEquals(0xBFFD, parser.number('foo - %00000011')) self.assertEqual(0xBFFD, parser.number('foo - %00000011'))
def test_number_label_offset_default_radix(self): def test_number_label_offset_default_radix(self):
parser = AddressParser() parser = AddressParser()
parser.labels = {'foo': 0xC000} parser.labels = {'foo': 0xC000}
parser.radix = 16 parser.radix = 16
self.assertEquals(0xC010, parser.number('foo+10')) self.assertEqual(0xC010, parser.number('foo+10'))
self.assertEquals(0xBFF0, parser.number('foo-10')) self.assertEqual(0xBFF0, parser.number('foo-10'))
self.assertEquals(0xC010, parser.number('foo + 10')) self.assertEqual(0xC010, parser.number('foo + 10'))
self.assertEquals(0xBFF0, parser.number('foo - 10')) self.assertEqual(0xBFF0, parser.number('foo - 10'))
parser.radix = 10 parser.radix = 10
self.assertEquals(0xC00A, parser.number('foo+10')) self.assertEqual(0xC00A, parser.number('foo+10'))
self.assertEquals(0xBFF6, parser.number('foo-10')) self.assertEqual(0xBFF6, parser.number('foo-10'))
self.assertEquals(0xC00A, parser.number('foo + 10')) self.assertEqual(0xC00A, parser.number('foo + 10'))
self.assertEquals(0xBFF6, parser.number('foo - 10')) self.assertEqual(0xBFF6, parser.number('foo - 10'))
def test_number_bad_label_with_offset(self): def test_number_bad_label_with_offset(self):
parser = AddressParser() parser = AddressParser()