Author: cito
Date: Fri Nov 27 07:39:21 2015
New Revision: 642
Log:
Skip test if German locale cannot be set
Modified:
branches/4.x/module/tests/test_classic_connection.py
Modified: branches/4.x/module/tests/test_classic_connection.py
==============================================================================
--- branches/4.x/module/tests/test_classic_connection.py Thu Nov 26
17:43:29 2015 (r641)
+++ branches/4.x/module/tests/test_classic_connection.py Fri Nov 27
07:39:21 2015 (r642)
@@ -941,7 +941,10 @@
# check that money values can be interpreted correctly
# if and only if the decimal point is set appropriately
# for the current lc_monetary setting
- query("set lc_monetary='en_US.UTF-8'")
+ try:
+ query("set lc_monetary='en_US.UTF-8'")
+ except pg.ProgrammingError:
+ self.skipTest("cannot set English money locale")
pg.set_decimal_point(None)
try:
r = query("select '34.25'::money").getresult()[0][0]
@@ -963,7 +966,10 @@
finally:
pg.set_decimal_point(point)
self.assertNotEqual(r, d('34.25'))
- query("set lc_monetary='de_DE.UTF-8'")
+ try:
+ query("set lc_monetary='de_DE.UTF-8'")
+ except pg.ProgrammingError:
+ self.skipTest("cannot set German money locale")
pg.set_decimal_point(None)
try:
r = query("select '34,25'::money").getresult()[0][0]
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql