Mercurial > python-hglib
comparison tests/test-import.py @ 68:a0328b08e028
tests: open files in binary mode so new lines aren't converted
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 09 Sep 2011 19:10:02 +0300 |
parents | 400cb1520834 |
children | 9746227239e0 |
comparison
equal
deleted
inserted
replaced
67:730c42743ba3 | 68:a0328b08e028 |
---|---|
20 def test_basic_cstringio(self): | 20 def test_basic_cstringio(self): |
21 self.client.import_(cStringIO.StringIO(patch)) | 21 self.client.import_(cStringIO.StringIO(patch)) |
22 self.assertEquals(self.client.cat(['a']), '1\n') | 22 self.assertEquals(self.client.cat(['a']), '1\n') |
23 | 23 |
24 def test_basic_file(self): | 24 def test_basic_file(self): |
25 open('patch', 'w').write(patch) | 25 open('patch', 'wb').write(patch) |
26 self.client.import_(['patch']) | 26 self.client.import_(['patch']) |
27 self.assertEquals(self.client.cat(['a']), '1\n') | 27 self.assertEquals(self.client.cat(['a']), '1\n') |