Skip to content

Add pytest coverage for core API#352

Merged
Ludy87 merged 3 commits into
mainfrom
codex/add-pytests-for-all-functionality
Jun 9, 2026
Merged

Add pytest coverage for core API#352
Ludy87 merged 3 commits into
mainfrom
codex/add-pytests-for-all-functionality

Conversation

@Ludy87

@Ludy87 Ludy87 commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide a comprehensive pytest suite to validate core library behavior and enable reliable CI checks.
  • Make tests runnable against the repository source layout without installing the package.

Description

  • Add tests/conftest.py to prepend src to sys.path so tests can import the package layout directly.
  • Add unit tests covering exceptions, models/serialization, enums/status values, GraphQL client (sync/async), HandlerGQL header/login/query wrappers, GQLHandler query/mutation wrappers, core PyXplora utilities, and sync PyXploraApi flows (fake GQL handler).
  • Update .gitignore to allow committing tests/ while continuing to ignore test bytecode and caches.

Testing

  • Ran the full test suite with pytest -q and all tests passed: 33 passed.
  • Tests exercise both synchronous and asynchronous client helpers as well as serialization and header-building logic using lightweight fakes and monkeypatching.

Codex Task

@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

@Ludy87 Ludy87 merged commit 0fc94fb into main Jun 9, 2026
6 of 12 checks passed
@Ludy87 Ludy87 deleted the codex/add-pytests-for-all-functionality branch June 9, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant