-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update API tests using factories #170
base: release-0.6.x
Are you sure you want to change the base?
Conversation
result = clz().all_observers | ||
assert result == ['TEST'] | ||
@pytest.fixture | ||
def layer_data(layer_density_factory, db_session): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest of not re-using the same method name within a file and pick something unique (e.g. layer_data_with_density)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think that is a good call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good! 🥇
).set_crs("epsg:26912") | ||
result = clz.from_area( | ||
type="density", | ||
shp=df.iloc[0].geometry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hesitant to lose these from_area tests, I think it is still important functionality to have safeguards around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. I think this test can be transferred over to the new structure.
This is looking good! |
Issue #158
Updates test_layer_measurements.py following the new test infrastructure using factories.
Adds a new factory with real layer density data.
Showing progress so far to ensure I'm on the right track.