PyUtilib / pyutilib

A collection of general Python utilities, including logging and file IO, subprocess management, plugin systems, and workflow management.
BSD 3-Clause "New" or "Revised" License
34 stars 20 forks source link

Adding a compatibility shim for assertRaisesRegex #79

Closed jsiirola closed 4 years ago

jsiirola commented 4 years ago

Fixes: Pyomo/pyomo#1283

Summary/Motivation:

assertRaisesRegexp was added in Python 3.2 and now issues a deprecation warning beginning in Python 3.8. This adds a definition of assertRaisesRegex to the pyutilib unittest wrapper in Python 2.

Changes proposed in this PR:

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.
coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.01%) to 61.039% when pulling da2f6aecfce5940235e8d40186dd03669187b497 on unittest-compat into 5964c9cafc077968b6724e87e3f4481eaa854422 on master.

codecov-io commented 4 years ago

Codecov Report

Merging #79 into master will increase coverage by 0.17%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
+ Coverage    62.9%   63.07%   +0.17%     
==========================================
  Files          87       87              
  Lines        8807     8783      -24     
==========================================
  Hits         5540     5540              
+ Misses       3267     3243      -24
Impacted Files Coverage Δ
pyutilib/th/pyunit.py 47.13% <0%> (-0.32%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5964c9c...da2f6ae. Read the comment docs.