Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add pytest fixture to control optional dependency #26902

Copy link
Copy link
Open
@TomAugspurger

Description

@TomAugspurger
Issue body actions

When a method depends on an optional dependency, we want to test behavior that relies on it being installed & not installed. Right now, we have to add skips for both cases

  1. Test behavior when installed, skip if not installed
  2. Test behavior when not installed, skip if installed

Ideally, we would always test the second, by simulating a missing dependency. Unfortunately, python's caching of imports makes this somewhat difficult to achieve. Hopefully it doesn't require writing a custom importer: https://docs.python.org/3/library/importlib.html#introduction

Metadata

Metadata

Assignees

No one assigned

    Labels

    DependenciesRequired and optional dependenciesRequired and optional dependenciesEnhancementTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.