Mercurial > hg > GlobalNeighbors
comparison tests/test_read.py @ 1:1b94f3bf97e5
* limit distance function
* start gridding
* improve unicode handling
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sat, 24 Jun 2017 14:02:14 -0700 |
parents | 5dba84370182 |
children | 49aae0c0293b |
comparison
equal
deleted
inserted
replaced
0:5dba84370182 | 1:1b94f3bf97e5 |
---|---|
6 | 6 |
7 import os | 7 import os |
8 import unittest | 8 import unittest |
9 from globalneighbors import schema | 9 from globalneighbors import schema |
10 from globalneighbors.read import read_tsv | 10 from globalneighbors.read import read_tsv |
11 from globalneighbors.read import read_city_list | |
11 | 12 |
12 | 13 |
13 here = os.path.dirname(os.path.abspath(__file__)) | 14 here = os.path.dirname(os.path.abspath(__file__)) |
14 data = os.path.join(here, 'data') | 15 data = os.path.join(here, 'data') |
15 | 16 |
45 | 46 |
46 # cast the data into types we want | 47 # cast the data into types we want |
47 for row in cities: | 48 for row in cities: |
48 row = schema.cast_row(row, types=schema.types) | 49 row = schema.cast_row(row, types=schema.types) |
49 | 50 |
51 def test_read_unicode(self): | |
52 """ensure we can read the cities as unicode""" | |
53 | |
54 cities = read_city_list(self.full_tsv) | |
55 | |
50 | 56 |
51 if __name__ == '__main__': | 57 if __name__ == '__main__': |
52 unittest.main() | 58 unittest.main() |