Testing Pdm Datareader With Pytest

Write and run pytest tests for the pdm-datareader library, focused on mocking the parts that cannot run in CI — pyodbc/SQLAlchemy engines and connections, Azure AD access tokens (msal-bearer), and query() execution. Covers module-global state resets, engine-cache assertions, and token-leak safety checks. Use when adding tests for tools.py, mocking database or auth, or fixing failing/ flaky tests.

equinor Updated 167 repo stars

File contents

equinor/pdm-datareader commit e317ad5054

Frequently asked questions

npx get-skill add equinor/testing-pdm-datareader-with-pytest