Skip to content

Commit

Permalink
Less extreme code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
micknudsen committed Dec 6, 2023
1 parent 4201170 commit 9d61844
Showing 1 changed file with 10 additions and 40 deletions.
50 changes: 10 additions & 40 deletions 2015/09/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)

0 comments on commit 9d61844

Please sign in to comment.