[python-shapely] 32/148: Revert "Removed non-working locale", do reintroduce patch as patch.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Thu Aug 20 17:42:00 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 40ba0a2ed80a61043ba36b0885e9ea981725c69c
Author: Pietro Battiston <me at pietrobattiston.it>
Date:   Tue Sep 14 12:05:57 2010 +0200

    Revert "Removed non-working locale", do reintroduce patch as patch.
    
    This reverts commit f04f99f9171d0a04fd618fb6a74464c6b7f23b19.
---
 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