예제 #1
0
 def test_no_decrease_one(self):
     uhura = Uhura()
     res = uhura.valid_no_decrease(111111, 111112)
     self.assertEqual(res, ["111111"])
예제 #2
0
 def test_large_three(self):
     uhura = Uhura()
     res = uhura.valid_larger_group(["111122"])
     self.assertEqual(res, ["111122"]) 
예제 #3
0
 def test_large_two(self):
     uhura = Uhura()
     res = uhura.valid_larger_group(["123444"])
     self.assertEqual(res, [])   
예제 #4
0
 def test_same_one(self):
     uhura = Uhura()
     res = uhura.valid_same(["123789"])
     self.assertEqual(res, []) 
예제 #5
0
 def test_no_decrease_two(self):
     uhura = Uhura()
     res = uhura.valid_no_decrease(223450, 223451)
     self.assertEqual(res, [])
예제 #6
0
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)))