Mercurial > public > mercurial-scm > hg-stable
diff tests/test-simplemerge.py @ 26587:56b2bcea2529
error: get Abort from 'error' instead of 'util'
The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be
confused about that and gives all the credit to 'util' instead of the
hardworking 'error'. In a spirit of equity, we break the cycle of injustice and
give back to 'error' the respect it deserves. And screw that 'util' poser.
For great justice.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 08 Oct 2015 12:55:45 -0700 |
parents | f18830651811 |
children | 86db5cb55d46 |
line wrap: on
line diff
--- a/tests/test-simplemerge.py Mon Oct 05 22:49:24 2015 -0700 +++ b/tests/test-simplemerge.py Thu Oct 08 12:55:45 2015 -0700 @@ -15,7 +15,7 @@ import unittest from unittest import TestCase -from mercurial import util, simplemerge +from mercurial import util, simplemerge, error # bzr compatible interface, for the tests class Merge3(simplemerge.Merge3Text): @@ -29,7 +29,7 @@ atext = '\n'.join([i.strip('\n') for i in a] + ['']) btext = '\n'.join([i.strip('\n') for i in b] + ['']) if util.binary(basetext) or util.binary(atext) or util.binary(btext): - raise util.Abort("don't know how to merge binary files") + raise error.Abort("don't know how to merge binary files") simplemerge.Merge3Text.__init__(self, basetext, atext, btext, base, a, b) @@ -321,7 +321,7 @@ self.assertEquals(ml, MERGED_RESULT) def test_binary(self): - self.assertRaises(util.Abort, Merge3, ['\x00'], ['a'], ['b']) + self.assertRaises(error.Abort, Merge3, ['\x00'], ['a'], ['b']) def test_dos_text(self): base_text = 'a\r\n'