[3.15] urllib: Add tests for HTTP errors to complete coverage (GH-154102) (#154120)
urllib: Add tests for HTTP errors to complete coverage (GH-154102)
* add test for httperror props such as reason and fp, and stringified urlerror test
* rm unnecessary 'reason' attr test, change url to filename and add reason and headers attr
* separate file pointer test
* prevent resource warning, close httperror exception
* exc > err
(cherry picked from commit
b8ec956716c183430a93929e6415ceed74089af1)
Co-authored-by: Ajob Kustra <ajob.edward.kustra@cern.ch>