Mercurial > public > mercurial-scm > python-hglib
annotate tests/test-hglib.py @ 145:f3c430afa598
hglib: abstract out use of cStringIO.StringIO (issue4520)
The cStringIO module does not exist in Python 3, but io.BytesIO does.
This change prepares for the use of io.BytesIO when available by
replacing all uses of cStringIO.StringIO with an object named BytesIO.
author | Brett Cannon <brett@python.org> |
---|---|
date | Fri, 13 Mar 2015 11:31:54 -0400 |
parents | 1b47146a4a2c |
children | c1b966866ed7 |
rev | line source |
---|---|
62
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
1 import common, hglib |
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
2 |
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
3 class test_hglib(common.basetest): |
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
4 def setUp(self): |
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
5 pass |
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
6 |
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
7 def test_close_fds(self): |
134 | 8 """A weird Python bug that has something to do to inherited file |
9 descriptors, see http://bugs.python.org/issue12786 | |
62
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
10 """ |
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
11 common.basetest.setUp(self) |
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
12 client2 = hglib.open() |
d1f57f162274
closefds on posix when using subprocess
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
13 self.client.close() |