• 
      

    Fix deprecation warnings and unittest2 usage in unit tests.

    Review Request #12494 — Created Aug. 2, 2022 and submitted — Latest diff uploaded

    Information

    kgb
    master

    Reviewers

    kgb

    We have a number of unit tests that emit warnings, some of which are
    errors in Python 3.11. These largely concern assertRaisesRegexp(),
    inspect.getargspec(), and some bad escaping in test strings.

    This updates all of our assertRaisesRegexp() calls to
    assertRaisesRegex(), adds a decorator to skip tests if
    inspect.getargspec() is not available, and fixes the string escaping.

    This uncovered some bad comparisons that led to unittest2 not being
    used on Python 2.7. Those have been updated to ensure we do properly
    install and use that module.

    Unit tests pass on Python 2.7 through 3.10.

    Commits

    Files