Skip to content

Make sure tests generated by pytest plugins are not ignored. #8425

Closed as not planned

Description

@zztalker

Need to improve handling pytest-plugins tests, because after resolving #7287 they are skipped.

[added by Eric Snow (@ericsnowcurrently)]:

Just to be clear, this is about pytest plugins that add in extra test nodes/items during the "collection" phase. By default pytest collects tests/suites/modules/packages on the filesystem (and optionally doctests). This is what the testing adapter script is focused on accommodating.

Additionally, pytest allows plugins to add test nodes (e.g. the pep8 plugin). However, the adapter doesn't know how to handle those. In #8242 we start ignoring them instead of failing. That isn't ideal, so we should work on supporting plugin-generated test nodes.

FWIW, I am not sure what the old code (parsing the pytest CLI output) used to do with plugin-generated nodes. My vague recollection is that it ignored them as well (but that should probably be verified). That is the reason this is an enhancement request.

Activity

  1. zztalker commented on Nov 7, 2019

    @zztalker
    Author

    Eric Snow (@ericsnowcurrently) please, take a look.

  2. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Nov 7, 2019
  3. ericsnowcurrently commented on Nov 7, 2019

    @ericsnowcurrently

    Thanks for opening this issue, Pavel Zaikin (@zztalker). Did I understand correctly from PR #8242 that you are going to work on a separate PR for this. If so, go for it! :) In the meantime we'll take a look as soon as we can.

    Luciana Abud (@luabud)

  4. eleanorjboyd commented on Oct 30, 2023

    @eleanorjboyd
    Member

    Hello! We have just finished our testing rewrite and are beginning the roll out to users. If you are able, it would be very helpful to know if your issue still exists on the rewrite! To use the rewrite yourself just add ”python.experiments.optInto": ["pythonTestAdapter"] to your user settings. You can confirm you have the rewrite enabled by setting your log level to trace, via the Developer: Set Log Level command in the command palette. Then check to see if Experiment 'pythonTestAdapter' is active is in your python logs.

    Thanks!

  5. svenaron commented on Nov 16, 2023

    @svenaron

    Hello! We have just finished our testing rewrite and are beginning the roll out to users. If you are able, it would be very helpful to know if your issue still exists on the rewrite! To use the rewrite yourself just add ”python.experiments.optInto": ["pythonTestAdapter"] to your user settings. You can confirm you have the rewrite enabled by setting your log level to trace, via the Developer: Set Log Level command in the command palette. Then check to see if Experiment 'pythonTestAdapter' is active is in your python logs.

    Thanks!

    Eleanor Boyd (@eleanorjboyd)
    I can confirm that the issue is still present, even with pythonTestAdapter enabled.
    The tests are shown in the output from the pytest collect call, but not in the test-panel.

  6. eleanorjboyd commented on Nov 27, 2023

    @eleanorjboyd
    Member

    Thank you for taking a look. I will investigate this shortly, thanks!

  7. github-actions commented on Dec 20, 2023

    @github-actions

    Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

  8. eleanorjboyd commented on Dec 20, 2023

    @eleanorjboyd
    Member

    Need community feedback here on if this is still a relevant ask people want for the extension, thanks!

  9. brettcannon commented on Feb 22, 2024

    @brettcannon
    Member

    Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue.

  10. locked as resolved and limited conversation to collaborators on Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions