Skip to content

Add directive supporting the use of remote data in doctests #2

Closed

Description

@drdavella

Something like .. remote-data, perhaps.

EDIT: astroquery relies on this feature to exist before they can enable doctest.

Activity

  1. bsipocz commented on Jul 17, 2018

    @bsipocz
    Member

    Related issue: astropy/astropy#2830

  2. kakirastern commented on Mar 29, 2019

    @kakirastern

    Hi, is it okay for me to work on this issue?

  3. kakirastern commented on Mar 29, 2019

    @kakirastern

    Thanks @bsipocz for the approval! Will follow up on this soon after investigating on the issue further.

  4. bsipocz commented on Mar 29, 2019

    @bsipocz
    Member

    you don't need to ask for permission to work on issues. If there are work in progress it is most probably cross linked somewhere in the issues.

  5. kakirastern commented on Mar 29, 2019

    @kakirastern

    Yup @bsipocz, understood.

  6. kakirastern commented on Mar 29, 2019

    @kakirastern

    I am guessing (albeit an educated one) that I will need to modify at least the file at "pytest-doctestplus/pytest_doctestplus/output_checker.py", plus some other tests too...

    Or in hindsight some file in the folder "pytest-doctestplus/pytest_doctestplus"

  7. kakirastern commented on Mar 29, 2019

    @kakirastern

    So something in the line of astropy/astropy#2830 (comment) are to be implemented...

    class DoctestRemoteDirective(Directive):
        ... do something with the pytest config.getoption('remote_data') ...
    
    def setup(app):
        app.add_directive('doctest-remote', DoctestRemoteDirective)
        app.add_directive('doctest-remote-all', DoctestRemoteDirective)
    
  8. kakirastern commented on Mar 29, 2019

    @kakirastern

    Note: Some other reference which may be useful regarding the OutputChecker and DocTestRunner classes relevant to the doctest.register_optionflag flag option in the proposed PR: https://docs.python.org/3/library/doctest.html#doctest.register_optionflag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions