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

Refactored validators and based them on Predicate #4

Merged
merged 3 commits into from Jul 20, 2015

Conversation

anler
Copy link
Contributor

@anler anler commented Jul 20, 2015

All validators can be based in Predicate, I refactored some of them that weren't.

Anler Hernandez Peral added 3 commits July 15, 2015 15:26
This script is generated by pytest and let us run the tests without
installling any dependency. Convenient for quickly running the test
suite without thinking about it.
Based Type and Is validators on Predicate since they are just concrete
instances of a predicate.

For checks such as `Int` where we want to avoid `True` and `False`
values to succeed I created `StrictType` which checks for
`type(data) == given_type`
    assert Length(1).validate('a')
    assert Length(2).validate('ab')
hirunatan added a commit that referenced this pull request Jul 20, 2015
@hirunatan hirunatan merged commit f4c6e4f into kaleidos:master Jul 20, 2015
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.

None yet

2 participants