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

Fix README to pass pytest doc test. #20

Merged
merged 1 commit into from
May 18, 2013

Conversation

Rogdham
Copy link
Contributor

@Rogdham Rogdham commented May 18, 2013

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.

@keleshev
Copy link
Owner

Well, it is a bit more complicated then that. The example uses set that means there is no correct oreder:

>>> 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'>

@Rogdham
Copy link
Contributor Author

Rogdham commented May 18, 2013

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.

@keleshev
Copy link
Owner

Yeah, list or tuple should be alright.

@Rogdham
Copy link
Contributor Author

Rogdham commented May 18, 2013

I've changed my commit: now it's using tuples.
(List were used in the example just before in the readme, so to have a bit of change I switched to tuples this time)

keleshev pushed a commit that referenced this pull request May 18, 2013
Fix README to pass pytest doc test.
@keleshev keleshev merged commit 65c4146 into keleshev:master May 18, 2013
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.

2 participants