def test_service(self) -> None: """Tests that matching 2nd and 3rd col means ordering by 4th col.""" unsorted = [ '4\tMine\tservice\tdriveway', '5\tMine\tservice\tallay', ] sort = [ '5\tMine\tservice\tallay', '4\tMine\tservice\tdriveway', ] self.assertEqual(util.sort_streets(unsorted), sort)
def test_primary(self) -> None: """Tests that missing 2nd col is ordered last.""" unsorted = [ '0\t\tprimary', '1\tPear\tprimary', '2\tApple\tsecondary', '3\tApple\tprimary', ] expected = [ '3\tApple\tprimary', '2\tApple\tsecondary', '1\tPear\tprimary', '0\t\tprimary', ] self.assertEqual(util.sort_streets(unsorted), expected)