def test_no_decrease_one(self): uhura = Uhura() res = uhura.valid_no_decrease(111111, 111112) self.assertEqual(res, ["111111"])
def test_large_three(self): uhura = Uhura() res = uhura.valid_larger_group(["111122"]) self.assertEqual(res, ["111122"])
def test_large_two(self): uhura = Uhura() res = uhura.valid_larger_group(["123444"]) self.assertEqual(res, [])
def test_same_one(self): uhura = Uhura() res = uhura.valid_same(["123789"]) self.assertEqual(res, [])
def test_no_decrease_two(self): uhura = Uhura() res = uhura.valid_no_decrease(223450, 223451) self.assertEqual(res, [])
import random from enterprise import NyotaUhura as Uhura uhura = Uhura() START = 240920 END = 789857 codes = uhura.valid_no_decrease(START, END) codes = uhura.valid_same(codes) print('Part one, Uhura says: {0}'.format(len(codes))) codes = uhura.valid_larger_group(codes) print('Part two, Uhura says: {0}'.format(len(codes)))