Fix README to pass pytest doc test.#20
Merged
Merged
Conversation
Owner
|
Well, it is a bit more complicated then that. The example uses >>> Schema(set([int, float])).validate(set([5, 7, 8, 'not int or float here']))
Traceback (most recent call last):
...
SchemaError: Or(<type 'float'>, <type 'int'>) did not validate 'not int or float here'
'not int or float here' should be instance of <type 'int'> |
Contributor
Author
|
Yep, that's true. Even if it seems that the set is iterated always in the same order for some reason. Would you prefer to change using lists instead? I don't think that using a list instead of a set makes any difference at that point in the readme, so it could be a solution. |
Owner
|
Yeah, list or tuple should be alright. |
Contributor
Author
|
I've changed my commit: now it's using tuples. |
keleshev
pushed a commit
that referenced
this pull request
May 18, 2013
Fix README to pass pytest doc test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned in #17, there is a small problem in the readme which makes the Travis builds fail for no real reason.
This PR is to fix it, so that Travis build are meaningful again! Will be great to see by the Travis status if the tests are passing or not.