Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gabrielfalcao/humble
Some nostalgic code I sketched as an idea for BDD framework. It's from 2011 and preceeds the great improvements I've done to sure since @clarete's contributions
https://github.com/gabrielfalcao/humble
Last synced: 42 minutes ago
JSON representation
Some nostalgic code I sketched as an idea for BDD framework. It's from 2011 and preceeds the great improvements I've done to sure since @clarete's contributions
- Host: GitHub
- URL: https://github.com/gabrielfalcao/humble
- Owner: gabrielfalcao
- Created: 2013-10-25T07:39:17.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-25T07:39:22.000Z (about 11 years ago)
- Last Synced: 2024-10-03T00:26:42.148Z (about 1 month ago)
- Language: Python
- Size: 97.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# humble
> Version 0.4.0# What
a library for expressive BDD tests on python
# Install
user@machine:~$ [sudo] pip install humble
# Documentation
from humble import describe
from mymodule import User
# objects
john = User(name="John Doe")he = describe(john, as_a="User")
he.should_be_a(User)
he.should_have("name").identical_to("John Doe")# lists
my_list = ['banana', 'apple']
it = describe(my_list, as_a='list of fruits')
it.should_be.iterable
it.has_the_member("banana")it.should_have.strings_only
it.should_have(2).membersit = describe([], as_a="empty_list")
it.should_be.iterable
it.should_be.empty# dicts
my_dict = {'name': 'Testy McTesterson'}
it = describe(my_dict, as_a="User")
it.should_be_a(dict)
it.should_be.iterable
it.has_the_member("name")
it.should_have("name").identical_to('Testy McTesterson')it.should_have("name").similar_to('')