コード例 #1
0
ファイル: test_day01.py プロジェクト: zhatt/adventofcode2019
 def test_part2_example3(self):
     result = day01.part2((100756, ))
     self.assertEqual(result, 50346)
コード例 #2
0
ファイル: test_day01.py プロジェクト: zhatt/adventofcode2019
 def test_part2_example1(self):
     result = day01.part2((14, ))
     self.assertEqual(result, 2)
コード例 #3
0
ファイル: test_day01.py プロジェクト: zhatt/adventofcode2019
 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
ファイル: test_cases.py プロジェクト: barnybug/aoc2019
def test_day01_part2():
    assert day01.part2([12]) == 2
    assert day01.part2([1969]) == 966
    assert day01.part2([100756]) == 50346
コード例 #6
0
ファイル: test_day01.py プロジェクト: zhatt/adventofcode2018
 def test_part2_example2(self):
     result = day01.part2((1, -1))
     self.assertEqual(result, 0)
コード例 #7
0
ファイル: test_day01.py プロジェクト: sguberman/advent2019
def test_part2():
    assert day01.part2('input_day01.txt') == 4973616
コード例 #8
0
def test_part2_mass_of_100756():
    mass = 100756
    assert day01.part2(mass) == 50346
コード例 #9
0
ファイル: test_day01.py プロジェクト: cmcconomy/adventofcode
def test_part2():
    test_result2 = 5
    out = part2(test_input)
    print(out)
    assert (out == test_result2)
コード例 #10
0
def test_part2_mass_of_14():
    mass = 14
    assert day01.part2(mass) == 2
コード例 #11
0
def test_part2_mass_of_1969():
    mass = 1969
    assert day01.part2(mass) == 966
コード例 #12
0
ファイル: test_day01.py プロジェクト: zhatt/adventofcode2018
 def test_part2_example5(self):
     result = day01.part2((7, 7, -2, -7, -4))
     self.assertEqual(result, 14)
コード例 #13
0
ファイル: test_day01.py プロジェクト: zhatt/adventofcode2018
 def test_part2_example4(self):
     result = day01.part2((-6, 3, 8, 5, -6))
     self.assertEqual(result, 5)
コード例 #14
0
ファイル: test_day01.py プロジェクト: zhatt/adventofcode2018
 def test_part2_example3(self):
     result = day01.part2((3, 3, 4, -2, -4))
     self.assertEqual(result, 10)
コード例 #15
0
ファイル: test_day01.py プロジェクト: zhatt/adventofcode2019
 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
ファイル: test_day01.py プロジェクト: sguberman/advent2020
def test_part2(puzzle_input, expected):
    assert part2(puzzle_input) == expected