projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a710485
)
Fix length calculation so it doesn't assume the length of the encoded
author
Zac Medico
<zmedico@gentoo.org>
Fri, 25 Sep 2009 06:01:56 +0000
(06:01 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 25 Sep 2009 06:01:56 +0000
(06:01 -0000)
string is the same as the unicode string.
svn path=/main/trunk/; revision=14424
pym/portage/tests/ebuild/test_array_fromfile_eof.py
patch
|
blob
|
history
diff --git
a/pym/portage/tests/ebuild/test_array_fromfile_eof.py
b/pym/portage/tests/ebuild/test_array_fromfile_eof.py
index 8eacb406bd7df2e2c169eb4f1f830bb646ab83c8..eebf0234c36fe350088a1b5887b144d6a95ca607 100644
(file)
--- a/
pym/portage/tests/ebuild/test_array_fromfile_eof.py
+++ b/
pym/portage/tests/ebuild/test_array_fromfile_eof.py
@@
-18,9
+18,10
@@
class ArrayFromfileEofTestCase(TestCase):
# http://bugs.python.org/issue5334
input_data = "an arbitrary string"
+ input_bytes = _unicode_encode(input_data,
+ encoding='utf_8', errors='strict')
f = tempfile.TemporaryFile()
- f.write(_unicode_encode(input_data,
- encoding='utf_8', errors='strict'))
+ f.write(input_bytes)
f.seek(0)
data = []
@@
-28,7
+29,7
@@
class ArrayFromfileEofTestCase(TestCase):
while not eof:
a = array.array('B')
try:
- a.fromfile(f, len(input_
data
) + 1)
+ a.fromfile(f, len(input_
bytes
) + 1)
except EOFError:
# python-3.0 lost data here
eof = True