Skip to content

Why is this not part of pytest? #100

Closed as not planned
Closed as not planned

Description

@pllim

We have compatibility problems once in a while, making me think, since none of these features are astronomy specific, why this is code not part of pytest?

Activity

  1. bsipocz commented on Mar 17, 2020

    @bsipocz
    Member

    I don't see this any different than the other plugins, and pytest's approach is to work with plugins. 🤷‍♀

  2. pllim commented on Mar 17, 2020

    @pllim
    ContributorAuthor

    But the code here inherits a lot from _pytest/doctest.py.

  3. Cadair commented on Mar 18, 2020

    @Cadair
    Contributor

    As there is already some doctest support in pytest it feels like it would not be out of scope if this were to be moved in. Why don't we ask the pytest devs if they would have it. If this needs a major refactor for 5.4 it sounds like the perfect opportunity to refactor it into core.

  4. bsipocz commented on Mar 18, 2020

    @bsipocz
    Member

    Then we must have this separately due to "historical reasons". A lot has changes since, so if they would take this into core, it would be great of course!

  5. bsipocz commented on Mar 18, 2020

    @bsipocz
    Member

    What do you think @nicoddemus, ☝️

  6. nicoddemus commented on Mar 19, 2020

    @nicoddemus
    Contributor

    Hi everyone 👋,

    Full disclosre, I'm not a user of doctests in general (although I've contributed to pytest's doctest support in the past).

    I see the following pytest-doctestplus features that are not available in pytest's core:

    • Float comparison
    • Ignoring warnings
    • Skip unconditionally
    • Dependencies
    • Remote Data (depends on pytest-remotedata)

    All of them (except perhaps for "Remote Data" support) seem reasonable to have in the core.

    As @bsipocz mentions, usually we prefer to extend pytest through plugins, but for features of the standard library where there's really not much diverting ways to go about it, integrating that feature into the core makes sense. To me doctesting falls into that category.

    For an example of a feature that's in the standard library but we don't have plans to integrate into the core is async support: asyncio is in the standard library, but there are other libraries with asynchronous support , like trio and twisted, so it makes sense to have separate plugins for each: pytest-asyncio, pytest-trio, and pytest-twisted.

    Integrating this to the core would require a champion however, someone who's willing to do the integration work and step up on occasion to help fix bugs on that module if they appear (of course core devs often help here, but is nice to have a champion/expert to turn to).

    One advantage is that there would be no more compatibility problems, as they are now in the core so compatibility is guaranteed.

    Having said all that, if a champion steps up, I would definitely be 👍 to integrate pytest-doctestplus into the core. I'm sure it would be very much appreciated by doctest users, as it introduces some very nice features.

    @RonnyPfannschmidt @bluetech, opinions?

  7. RonnyPfannschmidt commented on Mar 19, 2020

    @RonnyPfannschmidt

    personally i would prefer to merge the internal doctest plugin and this one into a pytest plugin thats outside of core but installed by default

    personally i also dont use/avoid doctests

  8. nicoddemus commented on Mar 19, 2020

    @nicoddemus
    Contributor

    personally i would prefer to merge the internal doctest plugin and this one into a pytest plugin thats outside of core but installed by default

    Perhaps, as this brings logistics problems about how to test it properly with pytest to solve the compatibility problem brought up here, but either way the first step would be to merge it into the core, and then discuss it how to split it as a separate plugin. 👍

  9. pllim commented on Mar 19, 2020

    @pllim
    ContributorAuthor

    Re: champion -- pinging @astropy/coordinators

  10. pllim commented on Mar 19, 2020

    @pllim
    ContributorAuthor

    Re: remote-data -- Yeah, maybe that can stay here or go to pytest-remotedata somehow.

  11. bsipocz commented on Mar 19, 2020

    @bsipocz
    Member

    Naively I don't think that can really go to remote data though as that's the bare minimum the doctests to know about the concept of remote-data

  12. pllim commented on Nov 30, 2020

    @pllim
    ContributorAuthor
  13. pllim commented on May 30, 2023

    @pllim
    ContributorAuthor

    Alas, this never happened, so now superseded by #199.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions