Jesús Cea Avión <j...@jcea.es> added the comment:

Amaury, thanks for your valuable feedback.

1. I forgot about the python implementation. I am not familiar with the new IO 
framework. Implemented now.

3. These new SEEK modes should not be used in text mode. In my new patch the 
modes are rejected in text mode, allowed in binary mode.

2. I have spend the last 3 hours studying "test_io.py", and I don't understand 
the Mock* usage. Your MockRawIO hint is valuable, but I can't think a way to 
test that C/Python implementation passes the new flags to the OS. If I 
understand correctly, any method implemented in the Mock will be hit instead of 
the IO implementation, and anything that reach IO implementation will not go 
back to the Mock. I don't understand... :-?. Or can you magically insert the 
Mock between the IO module and the OS?. I know something like this is 
happening, but I don't understand the mechanism.

How do you choose what Mock* are you using in each test?.

I have read about Mock testing in the past, but I don't understand the use 
here. Are they actually Mocks, as explained in 
http://agiletesting.blogspot.com/2009/07/python-mock-testing-techniques-and.html
 , for example?

Sorry.

Could you provide some hint?. Maybe in python-dev, for more audience?.

I have implemented a test "test_posix", if your OS can report holes in a file 
(so far modern Solaris/OpenSolaris/OpenIndiana, don't know about *bsd). Other 
OSs will ignore the test.

I know your time is valuable. Thanking for investing in me.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10142>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to