report at bugs
Jul 25, 2012, 6:48 AM
Post #6 of 10
R. David Murray <rdmurray [at] bitdance> added the comment:
[issue15447] A file is not properly closed by webbrowser._invoke
[In reply to]
@Anton: That's what I was guessing. If we had a unit test in test_webbrowser that did the same thing, we'd have seen the resource warning when running the tests and fixed it. However, it looks like there aren't *any* tests for webbrowser, not even in test_sundry (which just makes sure modules without tests are importable).
So adding a test that will trigger this resource warning requires setting up a test_webbrowser file first, even before we get to the problem of how to test something that wants to start up a web browser...(but that should be solvable with unittest.mock, I think).
Python tracker <report [at] bugs>
Python-bugs-list mailing list