/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_patch.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-01-03 20:21:48 UTC
  • mfrom: (7235.1.1 autodoc-python3)
  • Revision ID: breezy.the.bot@gmail.com-20190103202148-nz78enpakwe3ib8h
Fix autodoc_rstx generation on python 3.

Merged from https://code.launchpad.net/~jelmer/brz/autodoc-python3/+merge/361367

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from bzrlib.errors import BinaryFile
18
 
from bzrlib.patch import diff3
19
 
from bzrlib.tests import TestCaseInTempDir
 
17
from breezy.errors import BinaryFile
 
18
from breezy.patch import diff3
 
19
from breezy.tests import TestCaseInTempDir
20
20
 
21
21
 
22
22
class TestPatch(TestCaseInTempDir):
23
23
 
24
24
    def test_diff3_binaries(self):
25
 
        file('this', 'wb').write('a')
26
 
        file('other', 'wb').write('a')
27
 
        file('base', 'wb').write('\x00')
 
25
        with open('this', 'wb') as f:
 
26
            f.write(b'a')
 
27
        with open('other', 'wb') as f:
 
28
            f.write(b'a')
 
29
        with open('base', 'wb') as f:
 
30
            f.write(b'\x00')
28
31
        self.assertRaises(BinaryFile, diff3, 'unused', 'this', 'other', 'base')