cdv test failures
Robert Collins
robertc at robertcollins.net
Thu May 25 00:43:14 BST 2006
On Wed, 2006-05-24 at 18:33 -0500, John Arbash Meinel wrote:
> Robert Collins wrote:
> > I see cdv failures on about 50% of my test runs. Here is a sample:
> >
> > ======================================================================
> > FAIL: test_multiple_ranges (bzrlib.tests.test_diff.TestCDVDiffLib)
> >
> > vvvv[log from
> > bzrlib.tests.test_diff.TestCDVDiffLib.test_multiple_ranges]-----
> >
> > ^^^^[log from
> > bzrlib.tests.test_diff.TestCDVDiffLib.test_multiple_ranges]-----
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/home/robertc/source/baz/integration/bzrlib/tests/test_diff.py",
> > line 221, in test_multiple_ranges
> > , [(0, 0, 3), (6, 4, 3), (9, 20, 7)])
> > File "/home/robertc/source/baz/integration/bzrlib/tests/test_diff.py",
> > line 217, in chk_blocks
> > self.assertEquals(matching, blocks)
> > AssertionError: [(0, 0, 3), (6, 4, 3), (9, 20, 7)] != [(0, 0, 3), (6, 4,
> > 2), (8, 19, 8)]
>
> Are you saying that you get intermittent failures? As in sometimes this
> succeeds and sometimes it fails?
>
> I would have thought SequenceMatcher was deterministic, but it does use
> a dictionary. So if it is possible that keys don't stay sorted in the
> same order, I suppose it could return different results.
intermittent.
> In this specific case, both results are valid, because a letter is
> repeated. We have:
> abcdefgh i jklmnop
>
> versus
> abcXgh i YZQRSTUVWXYZ i jklmnop
>
> I added the spaces to make it clear.
>
> basically, the i could be associated early or late. If you want to
> remove the ambiguity, you could remove the last 'i' in the second
> string, and then change the match to
> [(0, 0, 3), (6, 4, 3), (9, 19, 7)]
>
> > Cheers,
> > Rob
> >
>
> That is the first I've heard of dictionaries not being deterministic. I
> know they are random, but I've never heard of them sorting in a
> different order.
I see 5 failing tests when they fail. Is it a single change to fix them
all?
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060525/b9e213b1/attachment.pgp
More information about the bazaar
mailing list