• Tim Peters's avatar
    Fred wasn't kidding -- there really are docs for the locale module <wink>. · 3cee7805
    Tim Peters authored
    Obtain the original locale in the documented way.  This way actually
    works for me.
    
    Restore the original locale at the end, instead of forcing to "C".
    
    Move the locale fiddling into the test driver instead of doing it as a
    side effect of merely importing the module.  I don't know why the test
    is mucking with locale (and also added a comment saying so), but it
    surely has no justification for doing that as an import side-effect.
    Now whenever the locale-changing code executes, the locale-restoring code
    will also get run.
    3cee7805
test_logging.py 15.8 KB