Skip to content

Doctests: --remote-data for .rst files? #2830

Closed

Description

@keflavich

http://astropy.readthedocs.org/en/latest/development/testguide.html#skipping-doctests documents how to:

  1. Mark tests as remote inline: # doctest: +REMOTE_DATA
  2. Skip tests within .rst docs: .. doctest-skip::, .. doctest-skip-all

Is there a way to mark .. doctest-remote or .. doctest-remote-all? I think it should be straightforward to add such a thing, but I don't know exactly how to write a new directive.

Activity

  1. keflavich commented on Aug 7, 2014

    @keflavich
    ContributorAuthor

    My first look says we need

    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)
    

    I'm just not sure how to get config into the DoctestXDirective's namespace, where config is an object found in pytest_plugins.py

  2. added this to the v1.0.0 milestone on Sep 21, 2014
  3. modified the milestones: Future, v1.0.0 on Jan 13, 2015
  4. pllim commented on Sep 30, 2016

    @pllim
    Member

    We have this now, right? Can we close this?

  5. added
    Close?Tell stale bot that this issue/PR is stale
    on Sep 30, 2016
  6. bsipocz commented on Oct 10, 2016

    @bsipocz
    Member

    @pllim - I think this issue was never addressed, and we still don't have a way to flag a block of doctest either with "REMOTE_DATA" or with "FLOAT_CMP".

  7. removed
    Close?Tell stale bot that this issue/PR is stale
    on Oct 10, 2016
  8. bsipocz commented on Jul 17, 2018

    @bsipocz
    Member

    This is now upstream in pytest-doctestplus, so closing it here. Nevertheless one can see the status in scientific-python/pytest-doctestplus#2.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions