<div dir="ltr"><div><div>I'm not advocating against functionnal tests in my answer, but if you want my opinion about them it's best explained here: <a href="http://blog.thecodewhisperer.com/permalink/integrated-tests-are-a-scam">http://blog.thecodewhisperer.com/permalink/integrated-tests-are-a-scam</a><br><br></div>Then I've answered for TDD and BDD and not for real live system, the purpose is different. By the way if you have cases where it's relevant to test open() in real live system, I'm curious.<br></div>Once you've tested open() is called correctly (by injecting a mock of open()) what's the point to test if it works in a real live system otherwise testing if open() implementation works correctly?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-09 14:31 GMT+02:00 Matt Wheeler <span dir="ltr"><<a href="mailto:m@funkyhat.org" target="_blank">m@funkyhat.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div class="gmail_quote"><div dir="ltr">On Tue, 9 May 2017, 11:50 Gregory Salvan, <<a href="mailto:apieum@gmail.com" target="_blank">apieum@gmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It's to generic to have complex examples, but you really can test everything without writing data in files, and it's not really relevant to test if data are really written as it's the same as testing if there's no errors in python "open" implementation. I think we can trust python developpers for that ;)</div></blockquote></div><div><br></div></span><div>No, it's not just testing that open() works correctly, it's also testing that it's being called correctly in a real* live system. You seem to be advocating against functional tests as a concept?</div><div><br></div><div>*certainly more real than a system involving mocking open() in a unit test.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></font></span></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr">--<br>
Matt Wheeler<br>
<a href="http://funkyh.at" target="_blank">http://funkyh.at</a></p>
</div></div>
</font></span></blockquote></div><br></div>