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

perform rounding either if field type is numeric or if value was casted to the number #37234

Merged
merged 1 commit into from
Jun 15, 2020
Merged

perform rounding either if field type is numeric or if value was casted to the number #37234

merged 1 commit into from
Jun 15, 2020

Conversation

alexbruy
Copy link
Contributor

Description

QGIS Processing testing framework allows to customize layer comparison. Among options are casting field values to some data type and setting values precision before comparison. But precision can be applied it only if expected field has numeric data type, so if fields have string data type (for example, if test result and expected result saved as CSV) and were casted to int or float setting precision for them won't take any effect.

This was found when investigating test failures in #37039.

Proposed PR allows to apply precision restriction also for fields which were casted to numeric data type. Another option will be to update failing tests and use more robust output format for problematic tests.

@alexbruy alexbruy requested a review from m-kuhn June 15, 2020 17:00
@github-actions github-actions bot added this to the 3.14.0 milestone Jun 15, 2020
@nyalldawson nyalldawson merged commit 136c5a4 into qgis:master Jun 15, 2020
@alexbruy alexbruy deleted the testing-cast-values branch June 16, 2020 03:49
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.

None yet

2 participants