From: Philip Jenvey Date: Tue, 28 Jul 2009 05:42:32 +0000 (+0000) Subject: avoid dumps output comparisons relying on dict ordering on jython X-Git-Tag: rel_0_6_6~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5d6796b252e939d2c6080b8144f36715c155d81;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git avoid dumps output comparisons relying on dict ordering on jython --- diff --git a/test/orm/test_attributes.py b/test/orm/test_attributes.py index 0295e42b22..fa26ec7d7e 100644 --- a/test/orm/test_attributes.py +++ b/test/orm/test_attributes.py @@ -7,7 +7,7 @@ from sqlalchemy.test import * from sqlalchemy.test.testing import eq_ from test.orm import _base from sqlalchemy.test.util import gc_collect -from sqlalchemy.util import cmp +from sqlalchemy.util import cmp, jython # global for pickling tests MyTest = None @@ -81,7 +81,9 @@ class AttributesTest(_base.ORMTest): del o2.__dict__['mt2'] o2.__dict__[o_mt2_str] = former - self.assert_(pk_o == pk_o2) + # Relies on dict ordering + if not jython: + self.assert_(pk_o == pk_o2) # the above is kind of distrurbing, so let's do it again a little # differently. the string-id in serialization thing is just an @@ -94,7 +96,9 @@ class AttributesTest(_base.ORMTest): o4 = pickle.loads(pk_o3) pk_o4 = pickle.dumps(o4) - self.assert_(pk_o3 == pk_o4) + # Relies on dict ordering + if not jython: + self.assert_(pk_o3 == pk_o4) # and lastly make sure we still have our data after all that. # identical serialzation is great, *if* it's complete :)