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

Commits on Jul 15, 2015

  1. runtests.py script

    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.
    Anler Hernandez Peral committed Jul 15, 2015
    Copy the full SHA
    162b50a View commit details
    Browse the repository at this point in the history
  2. Based Type and Is on Predicate

    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`
    Anler Hernandez Peral committed Jul 15, 2015
    Copy the full SHA
    c8020ac View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2015

  1. New Length validator checks for a given length

        assert Length(1).validate('a')
        assert Length(2).validate('ab')
    Anler Hernandez Peral committed Jul 20, 2015
    Copy the full SHA
    ff16915 View commit details
    Browse the repository at this point in the history