no_support('sybase', 'FIXME: guessing, needs confirmation'),
exclude('mysql', '<', (4, 1, 1), 'no unicode connection support'),
)
+
# third call, merge object already present.
# almost no calls.
- @profiling.function_call_count(12, variance=0.001)
+ @profiling.function_call_count(12, variance=0.001, versions={'2.4':8})
def go():
return sess2.merge(p2, load=False)
return round(x, 9)
elif isinstance(x, decimal.Decimal):
# really ?
- x = x.shift(decimal.Decimal(9)).to_integral() / pow(10, 9)
+ # (can also use shift() here but that is 2.6 only)
+ x = (x * decimal.Decimal("1000000000")).to_integral() / pow(10, 9)
return x
@testing.resolve_artifact_names
def test_float_coercion(self):
from sqlalchemy.orm import scoped_session, sessionmaker
import datetime
+
class SQLSoupTest(TestBase):
- __skip_if__ = (lambda: util.jython,)
-
+ __skip_if__ = (lambda: not SQLSoupTest._has_sqlite(),)
+
+ @classmethod
+ def _has_sqlite(cls):
+ try:
+ import sqlite3
+ except ImportError:
+ try:
+ import pysqlite2
+ except ImportError:
+ return False
+ return True
+
@classmethod
def setup_class(cls):
global engine