Changeset 565


Ignore:
Timestamp:
Nov 20, 2015, 4:44:55 PM (4 years ago)
Author:
cito
Message:

Using a better locale name for tests

In the test we need to force Postgres to use a money format that does
not use a dot as decimal point. Maybe we should try several common
locale names to get this test running on different platforms?

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.x/module/TEST_PyGreSQL_classic_connection.py

    r559 r565  
    919919        # if and only if the decimal point is set appropriately
    920920        # for the current lc_monetary setting
    921         query("set lc_monetary='en_US'")
     921        query("set lc_monetary='en_US.UTF-8'")
    922922        pg.set_decimal_point('.')
    923923        r = query("select '34.25'::money").getresult()[0][0]
     
    927927        r = query("select '34.25'::money").getresult()[0][0]
    928928        self.assertNotEqual(r, d('34.25'))
    929         query("set lc_monetary='de_DE'")
     929        query("set lc_monetary='de_DE.UTF-8'")
    930930        pg.set_decimal_point(',')
    931931        r = query("select '34,25'::money").getresult()[0][0]
  • trunk/module/TEST_PyGreSQL_classic_connection.py

    r562 r565  
    923923        # if and only if the decimal point is set appropriately
    924924        # for the current lc_monetary setting
    925         query("set lc_monetary='en_US'")
     925        query("set lc_monetary='en_US.UTF-8'")
    926926        pg.set_decimal_point('.')
    927927        r = query("select '34.25'::money").getresult()[0][0]
     
    931931        r = query("select '34.25'::money").getresult()[0][0]
    932932        self.assertNotEqual(r, d('34.25'))
    933         query("set lc_monetary='de_DE'")
     933        query("set lc_monetary='de_DE.UTF-8'")
    934934        pg.set_decimal_point(',')
    935935        r = query("select '34,25'::money").getresult()[0][0]
Note: See TracChangeset for help on using the changeset viewer.