versions pre-3.3.0 that did not have this
feature. [ticket:2173]
+- postgresql
+ - Some unit test fixes regarding numeric arrays,
+ MATCH operator. A potential floating-point
+ inaccuracy issue was fixed, and certain tests
+ of the MATCH operator only execute within an
+ EN-oriented locale for now. [ticket:2175].
+ Also in 0.6.8.
+
- mysql
- Unit tests pass 100% on MySQL installed
on windows.
Column('q', postgresql.ARRAY(Numeric))
)
metadata.create_all()
- t1.insert().execute(x=[5], y=[5], z=[6], q=[6.4])
+ t1.insert().execute(x=[5], y=[5], z=[6], q=[decimal.Decimal("6.4")])
row = t1.select().execute().first()
eq_(
row,
)).execute().fetchall()
eq_([3], [r.id for r in results])
+ @testing.requires.english_locale_on_postgresql
def test_simple_derivative_match(self):
results = \
matchtable.select().where(matchtable.c.title.match('nutshells'
)).execute().fetchall()
eq_([5], [r.id for r in results])
+ @testing.requires.english_locale_on_postgresql
def test_or_match(self):
results1 = \
matchtable.select().where(or_(matchtable.c.title.match('nutshells'
)).order_by(matchtable.c.id).execute().fetchall()
eq_([3, 5], [r.id for r in results2])
+ @testing.requires.english_locale_on_postgresql
def test_and_match(self):
results1 = \
matchtable.select().where(and_(matchtable.c.title.match('python'
)).execute().fetchall()
eq_([5], [r.id for r in results2])
+ @testing.requires.english_locale_on_postgresql
def test_match_across_joins(self):
results = matchtable.select().where(and_(cattable.c.id
== matchtable.c.category_id,
skip_if(_has_mysql_on_windows,
"Not supported on MySQL + Windows"
)
- )
\ No newline at end of file
+ )
+
+def english_locale_on_postgresql(fn):
+ return _chain_decorators_on(
+ fn,
+ skip_if(lambda: testing.against('postgresql') \
+ and not testing.db.scalar('SHOW LC_COLLATE').startswith('en'))
+ )