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

gt, lt, #188

Merged
merged 2 commits into from Jun 2, 2018
Merged

gt, lt, #188

merged 2 commits into from Jun 2, 2018

Conversation

@samuelcolvin
Copy link
Owner

@samuelcolvin samuelcolvin commented Jun 2, 2018

fix #176

@codecov
Copy link

@codecov 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():
Copy link
Contributor

@Gr1N Gr1N Jun 2, 2018

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)'
Copy link
Contributor

@Gr1N Gr1N Jun 2, 2018

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

Copy link
Owner Author

@samuelcolvin samuelcolvin Jun 2, 2018

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

@Gr1N
Copy link
Contributor

@Gr1N Gr1N commented Jun 2, 2018

👍

@samuelcolvin samuelcolvin merged commit 95aba15 into master Jun 2, 2018
5 checks passed
@samuelcolvin samuelcolvin deleted the fix-gt-lt branch Jun 2, 2018
samuelcolvin added a commit that referenced this issue Jun 6, 2018
samuelcolvin added a commit that referenced this issue Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants