Skip to content

add range validation #1887

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

markus-96
Copy link
Contributor

please, see #1868

Copy link

codspeed-hq bot commented Feb 17, 2025

CodSpeed Performance Report

Merging #1887 will not alter performance

Comparing markus-96:intfield-validator (3178553) with develop (5aae984)

Summary

✅ 16 untouched benchmarks

@coveralls
Copy link

Pull Request Test Coverage Report for Build 13370608176

Details

  • 15 of 15 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 89.435%

Totals Coverage Status
Change from base Build 13368119422: 0.01%
Covered Lines: 6535
Relevant Lines: 7131

💛 - Coveralls

Copy link
Contributor

@henadzit henadzit left a comment

Choose a reason for hiding this comment

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

Can you please copy the description from the previous PR?

@@ -14,6 +14,7 @@ Changelog
Added
^^^^^
- Implement __contains, __contained_by, __overlap and __len for ArrayField (#1877)
- Added default range validation to IntField, BigIntField, SmallIntField
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please mention this PR in CHANGELOG?

with self.assertRaises(ValidationError):
await testmodels.IntFields.create(intnum=-2147483649)

async def test_max(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

test_max_boundary_validation is probably a better name

with self.assertRaises(ValidationError):
await testmodels.SmallIntFields.create(smallintnum=-32769)

async def test_max(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

test_max_boundary_validation

with self.assertRaises(ValidationError):
await testmodels.BigIntFields.create(intnum=-9223372036854775809)

async def test_max(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

test_max_boundary_validation

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.

3 participants