Beispiel #1
0
 def test_two_fields(self) -> None:
     """Tests 2 columns."""
     unsorted = 'head\n1\tb\n2\ta'
     expected = 'head\n2\ta\n1\tb'
     self.assertEqual(util.sort_streets_csv(unsorted), expected)
Beispiel #2
0
 def write_osm_streets(self, result_from_overpass: str) -> None:
     """Writes the result for overpass of Relation.get_osm_streets_query()."""
     result = util.sort_streets_csv(result_from_overpass)
     with self.get_osm_streets_stream("w") as sock:
         sock.write(result)
Beispiel #3
0
 def test_single_field(self) -> None:
     """Tests a single column."""
     unsorted = 'head\n2\n1'
     expected = 'head\n1\n2'
     self.assertEqual(util.sort_streets_csv(unsorted), expected)