From: Guido van Rossum <gu...@python.org>
Sent: 21 May 2020 16:59
To: Steve Barnes <gadgetst...@live.co.uk>
Cc: remi.lape...@henki.fr; python-ideas@python.org
Subject: Re: [Python-ideas] Re: How to propose a change with tests where the 
failing test case (current behaviour) is bad or dangerous

Hi Steve,

Have you considered and rejected filing a bug on 
bugs.python.org<http://bugs.python.org>?

Or are you specifically concerned about how to write a test for this behavior 
that doesn't fill up the disk when the bug is present? On Unixoid systems 
there's a resource limit you can set to limit disk space IIRC (e.g. on my Mac, 
`ulimit -a` shows various limits including file size).

Solving this by patching write() seems somewhat complex because you'd really 
have to patch open() to return an io.IO subclass that has a patched write() 
method. But I'm sure it can be done in the context of a specific test. I 
wouldn't try patching it for *all* tests though -- there are many tests that 
might fail due to such a change. It also wouldn't help for file operations made 
directly from C code.

--Guido


[Steve Barnes]
Unfortunately we have no control over where the tests may be run – if run on 
Windows from the C: drive it could potentially brick the entire machine, (which 
of course some people might consider a bonus of course).
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/YKJXUXLH4HGNXFVHYRSNPLIXQZUEIF6P/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to