From 9d61844071a6235bfe8123314823aba5476a914d Mon Sep 17 00:00:00 2001 From: Michael Knudsen Date: Wed, 6 Dec 2023 05:57:27 +0100 Subject: [PATCH] Less extreme code formatting --- 2015/09/code.py | 50 ++++++++++--------------------------------------- 1 file changed, 10 insertions(+), 40 deletions(-) diff --git a/2015/09/code.py b/2015/09/code.py index 848ed1c..ba58a25 100644 --- a/2015/09/code.py +++ b/2015/09/code.py @@ -60,42 +60,18 @@ def setUp(self) -> None: ) def test_distance(self) -> None: - self.assertEqual( - self.map.distance("London", "Dublin"), - 464, - ) - self.assertEqual( - self.map.distance("Dublin", "London"), - 464, - ) - self.assertEqual( - self.map.distance("London", "Belfast"), - 518, - ) - self.assertEqual( - self.map.distance("Belfast", "London"), - 518, - ) - self.assertEqual( - self.map.distance("Dublin", "Belfast"), - 141, - ) - self.assertEqual( - self.map.distance("Belfast", "Dublin"), - 141, - ) + self.assertEqual(self.map.distance("London", "Dublin"), 464) + self.assertEqual(self.map.distance("Dublin", "London"), 464) + self.assertEqual(self.map.distance("London", "Belfast"), 518) + self.assertEqual(self.map.distance("Belfast", "London"), 518) + self.assertEqual(self.map.distance("Dublin", "Belfast"), 141) + self.assertEqual(self.map.distance("Belfast", "Dublin"), 141) def test_shortest_route(self) -> None: - self.assertEqual( - self.map.shortest_route(), - 605, - ) + self.assertEqual(self.map.shortest_route(), 605) def test_longest_route(self) -> None: - self.assertEqual( - self.map.longest_route(), - 982, - ) + self.assertEqual(self.map.longest_route(), 982) class TestPuzzles(unittest.TestCase): @@ -106,13 +82,7 @@ def setUp(self) -> None: ) def test_part_one(self) -> None: - self.assertEqual( - self.map.shortest_route(), - 117, - ) + self.assertEqual(self.map.shortest_route(), 117) def test_part_two(self) -> None: - self.assertEqual( - self.map.longest_route(), - 909, - ) + self.assertEqual(self.map.longest_route(), 909)