[python-shapely] 48/148: The non-run test _must_ still be there...

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Thu Aug 20 17:42:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository python-shapely.

commit 689cfb1cfc4c2bd6082564cce647bfbd6a8382a7
Author: Pietro Battiston <me at pietrobattiston.it>
Date:   Sun Sep 19 10:54:04 2010 +0200

    The non-run test _must_ still be there...
---
 shapely/tests/wkt_locale.txt | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/shapely/tests/wkt_locale.txt b/shapely/tests/wkt_locale.txt
new file mode 100644
index 0000000..ebbc024
--- /dev/null
+++ b/shapely/tests/wkt_locale.txt
@@ -0,0 +1,28 @@
+Test locale independence of WKT
+===============================
+
+Set locale to one that uses a comma as decimal seperator`
+
+  >>> import locale, sys
+  >>> if sys.platform == 'win32':
+  ...     _ = locale.setlocale(locale.LC_ALL, 'portuguese_brazil')
+  ... else:
+  ...     _ = locale.setlocale(locale.LC_ALL, 'pt_BR.UTF-8')
+
+Test reading and writing`
+
+  >>> from shapely.wkt import loads
+  >>> p = loads('POINT (0.0 0.0)')
+  >>> p.x == 0.0
+  True
+  >>> p.y == 0.0
+  True
+  >>> p.wkt
+  'POINT (0.0...)'
+  >>> from shapely.wkt import dumps
+  >>> dumps(p)
+  'POINT (0.0...)'
+
+Reset locale
+
+  >>> _ = locale.setlocale(locale.LC_ALL, '')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-shapely.git



More information about the Pkg-grass-devel mailing list