• Barry Warsaw's avatar
    Compare what's read from files against proper byte literals. Neither of these · 72937f32
    Barry Warsaw yazdı
    modules have unittests AFAICT, and I'm not improving things here, but these
    changes make a bunch of email package tests succeed, and command line testing
    against real files seems to make things better.
    
    Added an __main__ section to imghdr.py so that it can be run from the command
    line similarly to sndhdr.py.  Someone else can figure out a better -m way of
    doing this.
    
    In sndhdr.py do a couple of very minor cleanups, and use a with statement to
    not wait for gc to close the file.
    72937f32
sndhdr.py 5.89 KB