[pypy-issue] [issue1380] Tests come to grief under hglib-0.3

Amaury Forgeot d Arc tracker at bugs.pypy.org
Tue Jan 22 15:19:52 CET 2013


Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

All these tests contain a line like:
    open('patch', 'wb').write(patch)
which makes a big difference in PyPy: 
http://pypy.readthedocs.org/en/latest/cpython_differences.html#differences-related-to-garbage-collection-
strategies
Note that python3 would raise a ResourceWarning("unclosed file") as well, precisely for this reason.

The tests should ensure the file is correctly closed:
    with open('patch', 'wb') as f:
        f.write(patch)

----------
nosy: +afa
status: chatting -> wontfix

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1380>
________________________________________


More information about the pypy-issue mailing list