[Guido] > Lysator's snake-farm, which does regular builds of CVS Python > checkouts on a variety of uncommon platforms, has started reporting > two warnings that I don't understand. (Never mind the gettext.py > warnings; they're shallow; someone should fix them.) I submitted a patch for that to SF and assigned it to Barry (I have no idea how to test gettext.py). > The problem is the two exceptions ignored in __del__ methods. If I > look at the code of the new tempfile.py module and its > test_tempfile.py unittests, I see that there's a class mkstemped > defined in test_tempfile.py, which has a __del__ method that closes > the file descriptor. The only way I can see this failing with an > AttributeError exception is if the instance never makes it through its > __init__ call. I agree, and, indeed, that's what would happen if it did fail during the call to mkstemped.__init__(). So the call to tempfile._mkstemp_inner() fails in two test cases (there were two distinct instances of the "no attribute 'fd'" message), but we don't know which ones. > ... > But in that case I would have expect a failure reported; the only > instantiation of mkstemped() is inside a try/except where the > exceptclause calls self.failOnException() which causes the > unit tests to fail. But the unittest doesn't report any failures?! Well, I didn't see *any* test output in the report, neither successes nor failures, just Python-produced exceptions and warnings. Maybe the script only captures stderr? A failing unittest run *under* regrtest.py doesn't normally print anything to stderr. It would have printed this to stdout, though: """ ... test_tempfile test test_tempfile failed -- errors occurred; run in verbose mode for details ... 1 test failed: test_tempfile """ So even if we had that, it wouldn't have helped. stdout from a regrtest -v run is what we need, or from running test_tempfile.py directly (w/o regrtest).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4