Created
July 8, 2011 19:45
-
-
Save andrewsmedina/1072650 to your computer and use it in GitHub Desktop.
stub in python with ludibrio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> def agora(): | |
... return datetime.now() | |
... | |
>>> from ludibrio import Stub | |
>>> with Stub() as datetime: | |
... from datetime import datetime | |
... datetime.now() >> 'foo' | |
... | |
>>> agora() | |
'foo' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment