Skip to content

Adds conftest.py of common fixtures for integration tests#1273

Open
spjuhel wants to merge 5 commits intodevelopfrom
feature/conftest-for-common-fixtures
Open

Adds conftest.py of common fixtures for integration tests#1273
spjuhel wants to merge 5 commits intodevelopfrom
feature/conftest-for-common-fixtures

Conversation

@spjuhel
Copy link
Copy Markdown
Collaborator

@spjuhel spjuhel commented Mar 26, 2026

This is based on data test used for the integration tests of the static and interpolated trajectories.

The objective is to provide:

  • "as comprehensible as possible and as minimalistic as possible data (exposure, hazard, impfset)"
  • Factories

Changes proposed in this PR:

  • Adds fixtures and factories for minimalistic objects for integration testing
  • Adds an quick example of how to use them

We need to decide if this is something we actually want.
Otherwise, I will move the content to the trajectory integration test directly.

PR Author Checklist

PR Reviewer Checklist

@spjuhel
Copy link
Copy Markdown
Collaborator Author

spjuhel commented Mar 26, 2026

Notes from discussion:

  • shift the examples to a (possibly existing) page in the documentation

@spjuhel
Copy link
Copy Markdown
Collaborator Author

spjuhel commented Mar 31, 2026

Note for this PR (or rather for future improvements):

  • Have also fixtures with the DEMO files
  • Plan (a hackathon?) to move tests to use the fixtures

@spjuhel
Copy link
Copy Markdown
Collaborator Author

spjuhel commented Mar 31, 2026

I've added a documentation page,
I chose to make a new one because direct integration in the "Writing tests" one did not feel right, but I'm happy to reconsider. Note that there are two mentions/references in the "Writing tests" one!

I tried to find the balance between being explicit and concise (had help from Claude to be honest).

I am wondering about putting actual values in the documentation as this implies that we keep them up to date with the file (although the values should technically not change).

Quick access: https://climada-python--1273.org.readthedocs.build/en/1273/development/Guide_test_fixtures.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant