def setUp(self): self.scanner = Scanner()
class TestScanner(unittest.TestCase): def setUp(self): self.scanner = Scanner() def test_afs_to_dec(self): self.assertEqual(50, self.scanner.afs_to_dec('00-062')) self.assertEqual(51, self.scanner.afs_to_dec('00-063')) self.assertEqual(272, self.scanner.afs_to_dec('02-020')) self.assertEqual(273, self.scanner.afs_to_dec('02-021')) self.assertEqual(274, self.scanner.afs_to_dec('02-022')) self.assertEqual(275, self.scanner.afs_to_dec('02-023')) self.assertEqual(276, self.scanner.afs_to_dec('02-024')) self.assertEqual(277, self.scanner.afs_to_dec('02-025')) self.assertEqual(278, self.scanner.afs_to_dec('02-026')) self.assertEqual(279, self.scanner.afs_to_dec('02-027')) self.assertEqual(280, self.scanner.afs_to_dec('02-030')) self.assertEqual(281, self.scanner.afs_to_dec('02-031')) self.assertEqual(288, self.scanner.afs_to_dec('02-040')) self.assertEqual(289, self.scanner.afs_to_dec('02-041')) self.assertEqual(290, self.scanner.afs_to_dec('02-042')) self.assertEqual(291, self.scanner.afs_to_dec('02-043')) self.assertEqual(292, self.scanner.afs_to_dec('02-044')) self.assertEqual(304, self.scanner.afs_to_dec('02-060')) self.assertEqual(305, self.scanner.afs_to_dec('02-061')) self.assertEqual(306, self.scanner.afs_to_dec('02-062')) self.assertEqual(307, self.scanner.afs_to_dec('02-063')) self.assertEqual(320, self.scanner.afs_to_dec('02-080')) self.assertEqual(321, self.scanner.afs_to_dec('02-081')) self.assertEqual(322, self.scanner.afs_to_dec('02-082')) self.assertEqual(323, self.scanner.afs_to_dec('02-083')) self.assertEqual(336, self.scanner.afs_to_dec('02-100')) self.assertEqual(337, self.scanner.afs_to_dec('02-101')) self.assertEqual(338, self.scanner.afs_to_dec('02-102')) self.assertEqual(352, self.scanner.afs_to_dec('02-120')) self.assertEqual(353, self.scanner.afs_to_dec('02-121')) self.assertEqual(528, self.scanner.afs_to_dec('04-020')) self.assertEqual(529, self.scanner.afs_to_dec('04-021')) self.assertEqual(530, self.scanner.afs_to_dec('04-022')) self.assertEqual(531, self.scanner.afs_to_dec('04-023')) self.assertEqual(532, self.scanner.afs_to_dec('04-024')) self.assertEqual(533, self.scanner.afs_to_dec('04-025')) self.assertEqual(534, self.scanner.afs_to_dec('04-026')) self.assertEqual(535, self.scanner.afs_to_dec('04-027')) self.assertEqual(544, self.scanner.afs_to_dec('04-040')) self.assertEqual(545, self.scanner.afs_to_dec('04-041')) self.assertEqual(546, self.scanner.afs_to_dec('04-042')) self.assertEqual(547, self.scanner.afs_to_dec('04-043')) self.assertEqual(548, self.scanner.afs_to_dec('04-044')) self.assertEqual(549, self.scanner.afs_to_dec('04-045')) self.assertEqual(550, self.scanner.afs_to_dec('04-046')) self.assertEqual(551, self.scanner.afs_to_dec('04-047')) self.assertEqual(552, self.scanner.afs_to_dec('04-050')) self.assertEqual(560, self.scanner.afs_to_dec('04-060')) self.assertEqual(561, self.scanner.afs_to_dec('04-061')) self.assertEqual(562, self.scanner.afs_to_dec('04-062')) self.assertEqual(563, self.scanner.afs_to_dec('04-063')) self.assertEqual(576, self.scanner.afs_to_dec('04-080')) self.assertEqual(577, self.scanner.afs_to_dec('04-081')) self.assertEqual(578, self.scanner.afs_to_dec('04-082')) self.assertEqual(579, self.scanner.afs_to_dec('04-083')) self.assertEqual(580, self.scanner.afs_to_dec('04-084')) self.assertEqual(581, self.scanner.afs_to_dec('04-085')) self.assertEqual(582, self.scanner.afs_to_dec('04-086')) self.assertEqual(583, self.scanner.afs_to_dec('04-087')) self.assertEqual(584, self.scanner.afs_to_dec('04-090')) self.assertEqual(592, self.scanner.afs_to_dec('04-100')) self.assertEqual(593, self.scanner.afs_to_dec('04-101')) self.assertEqual(594, self.scanner.afs_to_dec('04-102')) self.assertEqual(595, self.scanner.afs_to_dec('04-103')) self.assertEqual(596, self.scanner.afs_to_dec('04-104')) self.assertEqual(597, self.scanner.afs_to_dec('04-105')) self.assertEqual(598, self.scanner.afs_to_dec('04-106')) self.assertEqual(599, self.scanner.afs_to_dec('04-107')) self.assertEqual(600, self.scanner.afs_to_dec('04-110')) self.assertEqual(784, self.scanner.afs_to_dec('06-020')) self.assertEqual(785, self.scanner.afs_to_dec('06-021')) self.assertEqual(786, self.scanner.afs_to_dec('06-022')) self.assertEqual(787, self.scanner.afs_to_dec('06-023')) self.assertEqual(788, self.scanner.afs_to_dec('06-024')) self.assertEqual(789, self.scanner.afs_to_dec('06-025')) self.assertEqual(790, self.scanner.afs_to_dec('06-026')) self.assertEqual(791, self.scanner.afs_to_dec('06-027')) self.assertEqual(800, self.scanner.afs_to_dec('06-040')) self.assertEqual(801, self.scanner.afs_to_dec('06-041')) self.assertEqual(802, self.scanner.afs_to_dec('06-042')) self.assertEqual(803, self.scanner.afs_to_dec('06-043')) self.assertEqual(804, self.scanner.afs_to_dec('06-044')) self.assertEqual(805, self.scanner.afs_to_dec('06-045')) self.assertEqual(806, self.scanner.afs_to_dec('06-046')) self.assertEqual(816, self.scanner.afs_to_dec('06-060')) self.assertEqual(817, self.scanner.afs_to_dec('06-061')) self.assertEqual(818, self.scanner.afs_to_dec('06-062')) self.assertEqual(819, self.scanner.afs_to_dec('06-063')) self.assertEqual(820, self.scanner.afs_to_dec('06-064')) self.assertEqual(821, self.scanner.afs_to_dec('06-065')) self.assertEqual(822, self.scanner.afs_to_dec('06-066')) self.assertEqual(823, self.scanner.afs_to_dec('06-067')) self.assertEqual(832, self.scanner.afs_to_dec('06-080')) self.assertEqual(833, self.scanner.afs_to_dec('06-081')) self.assertEqual(834, self.scanner.afs_to_dec('06-082')) self.assertEqual(835, self.scanner.afs_to_dec('06-083')) self.assertEqual(836, self.scanner.afs_to_dec('06-084')) self.assertEqual(838, self.scanner.afs_to_dec('06-086')) self.assertEqual(848, self.scanner.afs_to_dec('06-100')) self.assertEqual(849, self.scanner.afs_to_dec('06-101')) self.assertEqual(850, self.scanner.afs_to_dec('06-102')) self.assertEqual(851, self.scanner.afs_to_dec('06-103')) self.assertEqual(852, self.scanner.afs_to_dec('06-104')) self.assertEqual(864, self.scanner.afs_to_dec('06-120')) self.assertEqual(865, self.scanner.afs_to_dec('06-121')) self.assertEqual(866, self.scanner.afs_to_dec('06-122')) self.assertEqual(867, self.scanner.afs_to_dec('06-123')) self.assertEqual(868, self.scanner.afs_to_dec('06-124')) self.assertEqual(869, self.scanner.afs_to_dec('06-125')) self.assertEqual(870, self.scanner.afs_to_dec('06-126')) self.assertEqual(871, self.scanner.afs_to_dec('06-127')) self.assertEqual(872, self.scanner.afs_to_dec('06-130')) self.assertEqual(873, self.scanner.afs_to_dec('06-131')) self.assertEqual(874, self.scanner.afs_to_dec('06-132')) self.assertEqual(880, self.scanner.afs_to_dec('06-140')) self.assertEqual(881, self.scanner.afs_to_dec('06-141')) self.assertEqual(882, self.scanner.afs_to_dec('06-142')) self.assertEqual(883, self.scanner.afs_to_dec('06-143')) self.assertEqual(884, self.scanner.afs_to_dec('06-144')) self.assertEqual(885, self.scanner.afs_to_dec('06-145')) self.assertEqual(886, self.scanner.afs_to_dec('06-146')) self.assertEqual(1040, self.scanner.afs_to_dec('08-020')) self.assertEqual(1041, self.scanner.afs_to_dec('08-021')) self.assertEqual(1042, self.scanner.afs_to_dec('08-022')) self.assertEqual(1043, self.scanner.afs_to_dec('08-023')) self.assertEqual(1044, self.scanner.afs_to_dec('08-024')) self.assertEqual(1045, self.scanner.afs_to_dec('08-025')) self.assertEqual(1046, self.scanner.afs_to_dec('08-026')) self.assertEqual(1047, self.scanner.afs_to_dec('08-027')) self.assertEqual(1048, self.scanner.afs_to_dec('08-030')) self.assertEqual(1168, self.scanner.afs_to_dec('09-020')) self.assertEqual(1169, self.scanner.afs_to_dec('09-021')) self.assertEqual(1170, self.scanner.afs_to_dec('09-022')) self.assertEqual(1171, self.scanner.afs_to_dec('09-023')) self.assertEqual(1172, self.scanner.afs_to_dec('09-024')) self.assertEqual(1173, self.scanner.afs_to_dec('09-025')) self.assertEqual(1174, self.scanner.afs_to_dec('09-026')) self.assertEqual(1175, self.scanner.afs_to_dec('09-027')) self.assertEqual(1176, self.scanner.afs_to_dec('09-030')) self.assertEqual(1177, self.scanner.afs_to_dec('09-031')) self.assertEqual(1217, self.scanner.afs_to_dec('09-081')) self.assertEqual(1218, self.scanner.afs_to_dec('09-082')) self.assertEqual(1219, self.scanner.afs_to_dec('09-083')) self.assertEqual(1220, self.scanner.afs_to_dec('09-084')) self.assertEqual(1221, self.scanner.afs_to_dec('09-085')) self.assertEqual(1222, self.scanner.afs_to_dec('09-086')) self.assertEqual(1296, self.scanner.afs_to_dec('10-020')) self.assertEqual(1297, self.scanner.afs_to_dec('10-021')) self.assertEqual(1298, self.scanner.afs_to_dec('10-022')) self.assertEqual(1299, self.scanner.afs_to_dec('10-023')) self.assertEqual(1301, self.scanner.afs_to_dec('10-025')) self.assertEqual(1302, self.scanner.afs_to_dec('10-026')) self.assertEqual(1303, self.scanner.afs_to_dec('10-027')) self.assertEqual(1304, self.scanner.afs_to_dec('10-030')) self.assertEqual(1312, self.scanner.afs_to_dec('10-040')) self.assertEqual(1313, self.scanner.afs_to_dec('10-041')) self.assertEqual(1314, self.scanner.afs_to_dec('10-042')) self.assertEqual(1315, self.scanner.afs_to_dec('10-043')) self.assertEqual(1316, self.scanner.afs_to_dec('10-044')) self.assertEqual(1317, self.scanner.afs_to_dec('10-045')) self.assertEqual(1318, self.scanner.afs_to_dec('10-046')) self.assertEqual(1319, self.scanner.afs_to_dec('10-047')) self.assertEqual(1320, self.scanner.afs_to_dec('10-050')) self.assertEqual(1321, self.scanner.afs_to_dec('10-051')) self.assertEqual(1322, self.scanner.afs_to_dec('10-052')) self.assertEqual(1324, self.scanner.afs_to_dec('10-054')) self.assertEqual(1325, self.scanner.afs_to_dec('10-055')) self.assertEqual(1326, self.scanner.afs_to_dec('10-056')) self.assertEqual(1327, self.scanner.afs_to_dec('10-057')) self.assertEqual(1328, self.scanner.afs_to_dec('10-060')) self.assertEqual(1329, self.scanner.afs_to_dec('10-061')) self.assertEqual(1330, self.scanner.afs_to_dec('10-062')) self.assertEqual(1331, self.scanner.afs_to_dec('10-063')) self.assertEqual(1332, self.scanner.afs_to_dec('10-064')) self.assertEqual(1333, self.scanner.afs_to_dec('10-065')) self.assertEqual(1344, self.scanner.afs_to_dec('10-080')) self.assertEqual(1345, self.scanner.afs_to_dec('10-081')) self.assertEqual(1346, self.scanner.afs_to_dec('10-082')) self.assertEqual(1363, self.scanner.afs_to_dec('10-103')) self.assertEqual(1366, self.scanner.afs_to_dec('10-106')) self.assertEqual(1367, self.scanner.afs_to_dec('10-107')) self.assertEqual(1368, self.scanner.afs_to_dec('10-110')) self.assertEqual(1369, self.scanner.afs_to_dec('10-111')) self.assertEqual(1370, self.scanner.afs_to_dec('10-112')) self.assertEqual(1377, self.scanner.afs_to_dec('10-121')) self.assertEqual(1386, self.scanner.afs_to_dec('10-132')) self.assertEqual(1387, self.scanner.afs_to_dec('10-133')) self.assertEqual(1388, self.scanner.afs_to_dec('10-134')) self.assertEqual(1393, self.scanner.afs_to_dec('10-141')) self.assertEqual(1408, self.scanner.afs_to_dec('11-000')) self.assertEqual(1409, self.scanner.afs_to_dec('11-001')) self.assertEqual(1410, self.scanner.afs_to_dec('11-002')) self.assertEqual(1411, self.scanner.afs_to_dec('11-003')) self.assertEqual(1412, self.scanner.afs_to_dec('11-004')) self.assertEqual(1413, self.scanner.afs_to_dec('11-005')) self.assertEqual(1414, self.scanner.afs_to_dec('11-006')) self.assertEqual(1415, self.scanner.afs_to_dec('11-007')) self.assertEqual(1424, self.scanner.afs_to_dec('11-020')) self.assertEqual(1425, self.scanner.afs_to_dec('11-021')) self.assertEqual(1426, self.scanner.afs_to_dec('11-022')) self.assertEqual(1440, self.scanner.afs_to_dec('11-040')) self.assertEqual(1441, self.scanner.afs_to_dec('11-041')) self.assertEqual(1442, self.scanner.afs_to_dec('11-042')) self.assertEqual(1443, self.scanner.afs_to_dec('11-043')) self.assertEqual(1444, self.scanner.afs_to_dec('11-044')) self.assertEqual(1445, self.scanner.afs_to_dec('11-045')) self.assertEqual(1446, self.scanner.afs_to_dec('11-046')) self.assertEqual(1447, self.scanner.afs_to_dec('11-047')) self.assertEqual(1448, self.scanner.afs_to_dec('11-050')) self.assertEqual(1449, self.scanner.afs_to_dec('11-051')) self.assertEqual(1450, self.scanner.afs_to_dec('11-052')) self.assertEqual(1451, self.scanner.afs_to_dec('11-053')) self.assertEqual(1452, self.scanner.afs_to_dec('11-054')) self.assertEqual(1455, self.scanner.afs_to_dec('11-057')) self.assertEqual(1473, self.scanner.afs_to_dec('11-081')) self.assertEqual(1473, self.scanner.afs_to_dec('11-081')) self.assertEqual(1474, self.scanner.afs_to_dec('11-082')) self.assertEqual(1522, self.scanner.afs_to_dec('11-142')) self.assertEqual(1523, self.scanner.afs_to_dec('11-143')) self.assertEqual(1524, self.scanner.afs_to_dec('11-144')) self.assertEqual(1554, self.scanner.afs_to_dec('12-022')) self.assertEqual(1568, self.scanner.afs_to_dec('12-040')) self.assertEqual(1569, self.scanner.afs_to_dec('12-041')) self.assertEqual(1571, self.scanner.afs_to_dec('12-043')) self.assertEqual(1572, self.scanner.afs_to_dec('12-044')) self.assertEqual(1585, self.scanner.afs_to_dec('12-061')) self.assertEqual(1586, self.scanner.afs_to_dec('12-062')) self.assertEqual(1587, self.scanner.afs_to_dec('12-063')) self.assertEqual(1588, self.scanner.afs_to_dec('12-064')) self.assertEqual(1589, self.scanner.afs_to_dec('12-065')) self.assertEqual(1590, self.scanner.afs_to_dec('12-066')) self.assertEqual(1591, self.scanner.afs_to_dec('12-067')) self.assertEqual(1600, self.scanner.afs_to_dec('12-080')) self.assertEqual(1601, self.scanner.afs_to_dec('12-081')) self.assertEqual(1602, self.scanner.afs_to_dec('12-082')) self.assertEqual(1617, self.scanner.afs_to_dec('12-101')) self.assertEqual(1618, self.scanner.afs_to_dec('12-102')) self.assertEqual(1900, self.scanner.afs_to_dec('14-134')) self.assertEqual(1901, self.scanner.afs_to_dec('14-135')) self.assertEqual(1902, self.scanner.afs_to_dec('14-136')) self.assertEqual(1903, self.scanner.afs_to_dec('14-137'))