def test_update(self):
t1.update().compile()
- @profiling.function_call_count(122, {'2.4': 81})
+ @profiling.function_call_count(122, {'2.4': 81, '3':132})
def test_update_whereclause(self):
t1.update().where(t1.c.c2==12).compile()
# down from 185 on this
# this is a small slice of a usually bigger
# operation so using a small variance
- @profiling.function_call_count(95, variance=0.001, versions={'2.4':67})
+ @profiling.function_call_count(95, variance=0.001, versions={'2.4':67, '3':96})
def go():
return sess2.merge(p1, load=False)
# third call, merge object already present.
# almost no calls.
- @profiling.function_call_count(12, variance=0.001, versions={'2.4':8})
+ @profiling.function_call_count(12, variance=0.001, versions={'2.4':8, '3':13})
def go():
return sess2.merge(p2, load=False)
@testing.resolve_artifact_names
def test_binary_equality(self):
+ # Py3K
+ #data = b"this is some data"
+ # Py2K
+ data = "this is some data"
+ # end Py2K
+
mapper(Foo, t1)
s = create_session()
- f1 = Foo(data="this is some data")
+ f1 = Foo(data=data)
s.add(f1)
s.flush()
s.expire_all()
f1 = s.query(Foo).first()
- assert f1.data == "this is some data"
- f1.data = "this is some data"
+ assert f1.data == data
+ f1.data = data
eq_(
sa.orm.attributes.get_history(f1, "data"),
- ((), ["this is some data"], ())
+ ((), [data], ())
)
def go():
s.flush()