• 
      

    Add test assertion methods for checking warnings.

    Review Request #10494 — Created April 2, 2019 and submitted

    Information

    Djblets
    release-2.0.x

    Reviewers

    This introduces assertion methods for unit tests that checks if some
    code either emits a warning (assertWarns), or emits no warnings
    (assertNoWarnings). This simplifies the work that's normally needed
    (using warnings.catch_warnings()) to make basic warning testing
    simple. It's mostly a port of Review Board's assert_warns.

    Used this in other unit tests, which passed.

    Summary ID
    Add test assertion methods for checking warnings.
    This introduces assertion methods for unit tests that checks if some code either emits a warning (`assertWarns`), or emits no warnings (`assertNoWarnings`). This simplifies the work that's normally needed (using `warnings.catch_warnings()`) to make basic warning testing simple. It's mostly a port of Review Board's `assert_warns`.
    476ed0a992a5e00262ba272ea98f2ce32e91417b
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (511534b)