[Python-Dev] test_inspect failure
Sun, 21 Apr 2002 01:47:04 -0400
OK, it's down to this:
>>> f = open('../lib/test/regrtest.py', 'rU')
>>> g = open('../lib/test/regrtest.py')
IOW, opening in U mode screws up on Windows when universal newlines is
enabled. This screws test_inspect.py for reasons so complicated I won't
even try to trace the trail here; the bottom line is that lincache.py's
updatecache() uses U mode near the end:
fp = open(fullname, 'rU')
lines = fp.readlines()
For whatever reason, this only delivers the first 232 lines of regrtest.py.
I doubt it's a coincidence this is darned near exactly the first 8192 bytes
of the file.