On Wed, 17 Nov 2010 15:31:02 +0100 Jesus Cea <j...@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. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com