Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/split testing #174

Merged
merged 15 commits into from
Feb 13, 2023
Merged

Feature/split testing #174

merged 15 commits into from
Feb 13, 2023

Conversation

jacobcook1995
Copy link
Collaborator

Description

The test files have now been split such that their structure mirrors the structure of the package code. This PR also changes the name of the model specific model.py to {MODEL_NAME}_model.py to make things a bit clearer.

Fixes #166
Fixed #168

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@davidorme
Copy link
Collaborator

In addition to restructuring the test files to match the code directory structure, this also reorganises the test data files, merging the fixtures folder into the data folder used by the pytest-datadir extension.

Copy link
Collaborator

@davidorme davidorme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@vgro vgro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one minor comment.

"""Test module for model.py (and associated functionality).

This module tests the functionality of model.py, as well as other bits of code that
define models based on the class defined in model.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you like to add here {MODEL_NAME}_model.py? Or mention that this is a general test for the model?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that bit definitely could be clearer. I've tried to clarify that this script tests model.py which is the script that provides the framework that other specific models (e.g. abiotic_model.py) have to follow

@jacobcook1995 jacobcook1995 merged commit 444180c into develop Feb 13, 2023
@jacobcook1995 jacobcook1995 deleted the feature/split_testing branch February 13, 2023 09:07
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.

Restructure the tests folder. Testing models
3 participants