Skip to content

[test] Add unit tests for Python deprecation warnings #32

Description

@AryanSharma48

Problem

SmoothAPI maintains backwards compatibility with deprecated Python APIs,
including resilient_api and ResilientConfig.

These APIs emit DeprecationWarnings, but the warning behavior should be
covered by tests so that it is not accidentally removed in the future.

What needs to be done

Add pytest tests that verify the deprecated APIs emit the expected
DeprecationWarning.

The tests should verify both:

  • The warning type
  • The relevant warning message

Acceptance Criteria

  • A test covers resilient_api
  • A test covers ResilientConfig
  • pytest.warns(DeprecationWarning) or an equivalent approach is used
  • The warning message is validated
  • Tests pass with the existing test suite

Files to look at

  • packages/smooth-api-py/smooth_api/__init__.py
  • packages/smooth-api-py/tests/

Prerequisites

Basic Python and pytest.

Notes

The test should verify the current intended deprecation behavior rather
than changing the behavior itself.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions