boubakr92/AskWiki — pull request #2 by Ismael-VC (2014-03-03 18:37:08+00:00)
Title: Replace test in TestAskWiki.py for builtin doctest.testmod.

I think something like this is a better way to test modules and it is more consistent with the :snake: ecosystem.

http://docs.python.org/2/library/doctest.html

```
Example usage:

ismaelvc@toybox ~/D/t/AskWiki (master)> python2 AskWiki.py -v
Trying:
from AskWiki import AskWiki
Expecting nothing
ok
Trying:
wiki = AskWiki('en')
Expecting nothing
ok
Trying:
wiki_info = wiki.ask('wikipedia')
Expecting nothing
ok
Trying:
wiki_info[1070:1260]
Expecting:
u'Wikipedia (i/\u02ccw\u026ak\u0268\u02c8pi\u02d0di\u0259/ or i/\u02ccw\u026aki\u02c8pi\u02d0di\u0259/ WIK-i-PEE-dee-\u02
59) is a collaboratively edited, multilingual, free Internet encyclopedia that is supported by the non-profit Wikimedia Found
ation.'
ok
3 items had no tests:
__main__
__main__.AskWiki.__init__
__main__.AskWiki.ask
1 items passed all tests:
4 tests in __main__.AskWiki
4 tests in 4 items.
4 passed and 0 failed.
Test passed.
```

Cheers!

Ismael VC