예제 #1
0
 def test_part2_example3(self):
     result = day01.part2((100756, ))
     self.assertEqual(result, 50346)
예제 #2
0
 def test_part2_example1(self):
     result = day01.part2((14, ))
     self.assertEqual(result, 2)
예제 #3
0
 def test_part2_example2(self):
     result = day01.part2((1969, ))
     self.assertEqual(result, 966)
예제 #4
0
def test_part2():
    assert part2("day01/day01.dat") == 241
예제 #5
0
def test_day01_part2():
    assert day01.part2([12]) == 2
    assert day01.part2([1969]) == 966
    assert day01.part2([100756]) == 50346
예제 #6
0
 def test_part2_example2(self):
     result = day01.part2((1, -1))
     self.assertEqual(result, 0)
예제 #7
0
def test_part2():
    assert day01.part2('input_day01.txt') == 4973616
def test_part2_mass_of_100756():
    mass = 100756
    assert day01.part2(mass) == 50346
예제 #9
0
def test_part2():
    test_result2 = 5
    out = part2(test_input)
    print(out)
    assert (out == test_result2)
def test_part2_mass_of_14():
    mass = 14
    assert day01.part2(mass) == 2
def test_part2_mass_of_1969():
    mass = 1969
    assert day01.part2(mass) == 966
예제 #12
0
 def test_part2_example5(self):
     result = day01.part2((7, 7, -2, -7, -4))
     self.assertEqual(result, 14)
예제 #13
0
 def test_part2_example4(self):
     result = day01.part2((-6, 3, 8, 5, -6))
     self.assertEqual(result, 5)
예제 #14
0
 def test_part2_example3(self):
     result = day01.part2((3, 3, 4, -2, -4))
     self.assertEqual(result, 10)
예제 #15
0
 def test_part2_input(self):
     result = day01.part2(aoc.read_input('day01.input'))
     self.assertEqual(result, 5106777)
예제 #16
0
def test_1_2_examples():
    examples = []
    for (inp, out) in examples:
        assert out == day01.part2(inp)
예제 #17
0
def test_day1_part2():
    assert part2([1721, 979, 366, 299, 675, 1456]) == 241861950
예제 #18
0
def test_part2(puzzle_input, expected):
    assert part2(puzzle_input) == expected