• 
      

    Add a test helper to run within a Sphinx environment.

    Review Request #12516 — Created Aug. 8, 2022 and submitted

    Information

    beanbag-docutils
    master

    Reviewers

    This adds SphinxExtTestCase.with_sphinx_env(), a context manager that
    sets up a Sphinx test environment and allows a caller to run within its
    context.

    It's a simplified version of the sphinx_testing.with_app() helper,
    which was a bit too rigid for our uses.

    The BeanbagDocstring tests now run within this environment, which will
    be important for upcoming changes.

    All unit tests pass.

    Summary ID
    Add a test helper to run within a Sphinx environment.
    This adds `SphinxExtTestCase.with_sphinx_env()`, a context manager that sets up a Sphinx test environment and allows a caller to run within its context. It's a simplified version of the `sphinx_testing.with_app()` helper, which was a bit too rigid for our uses. The `BeanbagDocstring` tests now run within this environment, which will be important for upcoming changes.
    00ae6e79d41b446179a98a04a83049148b08b7a8
    Description From Last Updated

    'sphinx.application.Sphinx' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot

    'sphinx.config.Config' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot

    'sphinx.ext.napoleon.Config as NapoleonConfig' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot

    'sphinx_testing.util.docutils_namespace' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot
    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 master (8dbefcc)