def test_part1(): with open('input.txt') as file: specs = file.read() n = 1000 moons = MoonSet(specs) moons.run(n) assert moons.total_energy() == 12082
def test_energy(input_, n, energy): moons = MoonSet(input_) moons.run(n) assert moons.total_energy() == energy
def test_energy1(): moons = MoonSet(test_input_1) moons.run(10) assert moons.total_energy() == 179
def test_1(input_, n, state): moons = MoonSet(input_) moons.run(n) expected = MoonSet.build_from_test_data(state) assert moons == expected