|
MockitoForPython
(Draft)Experimental mockito for python: when(mock).getStuff().thenReturn("stuff")
when(mock).getStuff().thenRaise(Exception("foo"))
mock.getStuff()
mock.doSomething()
verify(mock).doSomething()Sources here or here: svn checkout http://mockito.googlecode.com/svn/python/trunk mockito-python Motivated by a recent release of Mox I started hacking Python version. It seems Python does not have a decent Test Spy framework so I decided to close this gap. Python version is more like experimental. I don't have much experience in Python but I'm having real fun writing a mocking framework in this language. Do you know Python very well? Are you also keen on mocking? Start helping us by joining mockito-python mailing list! |
Sign in to add a comment
