• 
      

    Support simulating file fetch errors in TestTool.

    Review Request #12294 — Created May 22, 2022 and submitted

    Information

    Review Board
    release-4.0.x

    Reviewers

    TestTool.get_file() now accepts special bad:file-not-found and
    bad:scm-error paths that will simulate the FileNotFoundError and
    SCMError exceptions, respectively. This can aid in testing against
    these sorts of results without needing to spy on methods.

    Made use of this in an upcoming change. Simulated both error types.

    Summary ID
    Support simulating file fetch errors in TestTool.
    `TestTool.get_file()` now accepts special `bad:file-not-found` and `bad:scm-error` paths that will simulate the `FileNotFoundError` and `SCMError` exceptions, respectively. This can aid in testing against these sorts of results without needing to spy on methods.
    9e50c48d637c9521f22a36da13bf9ccfba7b2eff
    Description From Last Updated

    F821 undefined name 'FileNotFoundError'

    reviewbotreviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-4.0.x (1b2736b)