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

gt, lt, #188

Merged
merged 2 commits into from Jun 2, 2018

Conversation

2 participants
@samuelcolvin
Owner

samuelcolvin commented Jun 2, 2018

fix #176

@codecov

This comment has been minimized.

codecov bot commented Jun 2, 2018

Codecov Report

Merging #188 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #188   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines        1036   1036           
  Branches      214    214           
=====================================
  Hits         1036   1036
@@ -836,3 +836,27 @@ class Model(BaseModel):
assert exc_info.value.flatten_errors() == result
else:
assert Model(foo=value).foo == result
def test_gt():

This comment has been minimized.

@Gr1N

Gr1N Jun 2, 2018

Collaborator

maybe better to name test_number_gt and test_number_lt?

with pytest.raises(ValidationError) as exc_info:
Model(a=-1)
assert (
'ensure this value is greater than -1 (type=value_error.number.gt; limit_value=-1)'

This comment has been minimized.

@Gr1N

Gr1N Jun 2, 2018

Collaborator

why you want to use string representation of errors not .flatten_errors() like in all other tests?

This comment has been minimized.

@samuelcolvin

samuelcolvin Jun 2, 2018

Owner

I was just doing the quickest thing, doing it various different ways in tests is a good thing.

@Gr1N

This comment has been minimized.

Collaborator

Gr1N commented Jun 2, 2018

👍

@samuelcolvin samuelcolvin merged commit 95aba15 into master Jun 2, 2018

5 checks passed

codecov/project 100% (+0%) compared to 31f5f9c
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
pyup.io/safety-ci No dependencies with known security vulnerabilities.
Details

@samuelcolvin samuelcolvin deleted the fix-gt-lt branch Jun 2, 2018

samuelcolvin added a commit that referenced this pull request Jun 6, 2018

@samuelcolvin samuelcolvin referenced this pull request Jun 6, 2018

Merged

lt and gt further fix #193

samuelcolvin added a commit that referenced this pull request Jun 7, 2018

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