On Wed, 17 Nov 2010 15:31:02 +0100 Jesus Cea <jcea at jcea.es> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all. I am modifying IO module for Python 3.2, and I am unable to > understand the mechanism used in IO testsuite to test both the C and the > Python implementation. > > In particular I need to test that the implementation passes some > parameters to the OS. > > The module uses "Mock" classes, but I think "Mock" is something else, > and I don't see how it interpose between the C/Python code and the OS. It doesn't interpose between Python and the OS: it mocks the OS. It is, therefore, a mock (!). Consequently, if you want to test that parameters are passed to the OS, you shouldn't use a mock, but an actual file. There are several tests which already do that, it shouldn't be too hard to write your own. Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4