-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Some help, please?
I haven't received any responses to this. It seems like the FakeLibrarian is pretty broken. I'll have to switch back to the bad old ways if I can't fix this, and that would be pretty sad. Aaron On 09/21/2010 02:09 PM, Aaron Bentley wrote: > Hi all, > > This test used to work. Then I merged that latest stable, and now it > dies with a KeyError deep within Storm. > > class TestBranchMergeProposalGetIncrementalDiffs(TestCaseWithFactory): > > layer = ZopelessDatabaseLayer > > def test_getIncrementalDiffs_respects_input_order(self): > """The order of the output follows the input order.""" > bmp = self.factory.makeBranchMergeProposal() > librarian = FakeLibrarian() > self.useFixture(librarian) > diff1 = self.factory.makeIncrementalDiff(merge_proposal=bmp) > diff2 = self.factory.makeIncrementalDiff(merge_proposal=bmp) > result = bmp.getIncrementalDiffs([ > (diff1.old_revision, diff1.new_revision), > (diff2.old_revision, diff2.new_revision), > ]) > self.assertEqual([diff1, diff2], result) > result = bmp.getIncrementalDiffs([ > (diff2.old_revision, diff2.new_revision), > (diff1.old_revision, diff1.new_revision), > ]) > self.assertEqual([diff2, diff1], result) > > > > $ bin/test -t test_getIncrementalDiffs_respects_input_order > test_branchmergeproposal > Running canonical.testing.layers.ZopelessDatabaseLayer tests: > Set up canonical.testing.layers.BaseLayer in 0.002 seconds. > Set up canonical.testing.layers.ZopelessLayer in 5.256 seconds. > Set up canonical.testing.layers.DatabaseLayer in 0.339 seconds. > Set up canonical.testing.layers.ZopelessDatabaseLayer in 0.000 seconds. > > > Error in test > lp.code.model.tests.test_branchmergeproposal.TestBranchMergeProposalGetIncrementalDiffs.test_getIncrementalDiffs_respects_input_order > Traceback (most recent call last): > _StringException: Text attachment: traceback > ------------ > Traceback (most recent call last): > File > "/home/abentley/launchpad/stable/eggs/testtools-0.9.6-py2.6.egg/testtools/runtest.py", > line 144, in _run_user > return fn(*args) > File > "/home/abentley/launchpad/stable/eggs/testtools-0.9.6-py2.6.egg/testtools/testcase.py", > line 465, in _run_test_method > testMethod() > File > "/home/abentley/launchpad/incremental-diffs/lib/lp/code/model/tests/test_branchmergeproposal.py", > line 1896, in test_getIncrementalDiffs_respects_input_order > diff1 = self.factory.makeIncrementalDiff(merge_proposal=bmp) > File > "/home/abentley/launchpad/incremental-diffs/lib/lp/testing/factory.py", > line 313, in with_default_master_store > return func(*args, **kw) > File > "/home/abentley/launchpad/incremental-diffs/lib/lp/testing/factory.py", > line 1230, in makeIncrementalDiff > diff = self.makeDiff() > File > "/home/abentley/launchpad/incremental-diffs/lib/lp/testing/factory.py", > line 313, in with_default_master_store > return func(*args, **kw) > File > "/home/abentley/launchpad/incremental-diffs/lib/lp/testing/factory.py", > line 1215, in makeDiff > Diff.fromFile(StringIO(diff_text), len(diff_text))) > File > "/home/abentley/launchpad/incremental-diffs/lib/lp/code/model/diff.py", > line 250, in fromFile > removed_lines_count=removed_lines_count) > File > "/home/abentley/launchpad/incremental-diffs/lib/canonical/database/sqlbase.py", > line 215, in __init__ > self._create(None, **kwargs) > File > "/home/abentley/launchpad/stable/eggs/storm-0.17_launchpad_1-py2.6-linux-x86_64.egg/storm/sqlobject.py", > line 294, in _create > self.set(**kwargs) > File > "/home/abentley/launchpad/stable/eggs/storm-0.17_launchpad_1-py2.6-linux-x86_64.egg/storm/sqlobject.py", > line 300, in set > setattr(self, attr, value) > File > "/home/abentley/launchpad/stable/eggs/storm-0.17_launchpad_1-py2.6-linux-x86_64.egg/storm/references.py", > line 194, in __set__ > self._relation.link(local, remote, True) > File > "/home/abentley/launchpad/stable/eggs/storm-0.17_launchpad_1-py2.6-linux-x86_64.egg/storm/references.py", > line 651, in link > remote_var = remote_vars[remote_column] > KeyError: <storm.properties.PropertyColumn object at 0x5d62710> > > > The PropertyColumn in question is "diff_text", which is where I store a > LibraryFileAlias. > > Aaron _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkybmacACgkQ0F+nu1YWqI0Q7QCffFhP592wmIhjSYEWFpuRHPsK xbgAn2Ve3i88Mi+VRvMMubqGTZy/VXiM =mu6N -----END PGP SIGNATURE----- _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp

