[PATCH hglib] tests: introduce basic test for add and addremove
Matt Mackall
mpm at selenic.com
Mon Feb 6 22:12:11 UTC 2012
On Fri, 2012-02-03 at 16:14 +0100, Andrey Somov wrote:
> # HG changeset patch
> # User py4fun
> # Date 1328216672 -3600
> # Node ID eae2e123ec7f4f525f4c1b80275450825c16b98f
> # Parent e5d3b0aa48e6ab79531204f61e25ee335b306df3
> tests: introduce basic test for add and addremove
> + def test_add_non_existing(self):
> + self.append('a', 'a\n')
> + self.assertFalse(self.client.add('b'))
> + #TODO self.assertFalse(self.client.addremove('b'))
> + # this is not how it is defined - b does not exist, addremove should return False
> + self.assertTrue(self.client.addremove('b'))
If I were apply this patch (as I nearly did), you would have made the
bug you're worried about HARDER to fix (and possibly convince a would-be
fixer that it was intentional behavior by causing the test suite to
fail). It's fine to say "here's a thing that breaks" but please don't
wrap it up as a patch for applying to the project.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list