[python-mapnik] 01/05: Imported Upstream version 0.0~20151022-ab8b1f6
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Sat Oct 24 14:18:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository python-mapnik.
commit 2d1d8c460b85a96694b36b3eb8a20e7a80921f73
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Oct 24 14:26:49 2015 +0200
Imported Upstream version 0.0~20151022-ab8b1f6
---
setup.py | 6 +++++-
test/python_tests/csv_test.py | 19 ++++++++-----------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/setup.py b/setup.py
index 8832a48..d59e0cf 100755
--- a/setup.py
+++ b/setup.py
@@ -167,8 +167,12 @@ elif create_paths:
if create_paths:
f_paths.write("inputpluginspath = os.path.join(mapniklibpath,'input')\n")
+ if os.environ.get('SYSTEM_FONTS'):
+ font_path = "os.path.normpath('{path}')".format(path=os.environ.get('SYSTEM_FONTS'))
+ else:
+ font_path = "os.path.join(mapniklibpath,'fonts')"
f_paths.write(
- "fontscollectionpath = os.path.join(mapniklibpath,'fonts')\n")
+ "fontscollectionpath = {path}\n".format(path=font_path))
f_paths.write(
"__all__ = [mapniklibpath,inputpluginspath,fontscollectionpath]\n")
f_paths.close()
diff --git a/test/python_tests/csv_test.py b/test/python_tests/csv_test.py
index c6bffa0..bb49898 100644
--- a/test/python_tests/csv_test.py
+++ b/test/python_tests/csv_test.py
@@ -54,7 +54,9 @@ if 'csv' in mapnik.DatasourceCache.plugin_names():
good_files.extend(glob.glob("../data/csv/warns/*.*"))
ignorable = os.path.join('..', 'data', 'csv', 'long_lat.vrt')
good_files.remove(ignorable)
-
+ for f in good_files:
+ if f.endswith('.index'):
+ good_files.remove(f)
for csv in good_files:
if visual:
try:
@@ -492,18 +494,13 @@ if 'csv' in mapnik.DatasourceCache.plugin_names():
def test_that_blank_undelimited_rows_are_still_parsed(**kwargs):
ds = get_csv_ds('more_headers_than_column_values.csv')
- eq_(len(ds.fields()), 5)
- eq_(ds.fields(), ['x', 'y', 'one', 'two', 'three'])
- eq_(ds.field_types(), ['int', 'int', 'str', 'str', 'str'])
+ eq_(len(ds.fields()), 0)
+ eq_(ds.fields(), [])
+ eq_(ds.field_types(), [])
fs = ds.featureset()
- feat = fs.next()
- eq_(feat['x'], 0)
- eq_(feat['y'], 0)
- eq_(feat['one'], '')
- eq_(feat['two'], '')
- eq_(feat['three'], '')
+ eq_(fs, None)
desc = ds.describe()
- eq_(desc['geometry_type'], mapnik.DataGeometryType.Point)
+ eq_(desc['geometry_type'], None)
@raises(RuntimeError)
def test_that_fewer_headers_than_rows_throws(**kwargs):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-mapnik.git
More information about the Pkg-grass-devel
mailing list