A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2019-February/156313.html below:

[Python-Dev] Adding test.support.safe_rmpath()

[Python-Dev] Adding test.support.safe_rmpath() [Python-Dev] Adding test.support.safe_rmpath()Joni Orponen j.orponen at 4teamwork.ch
Thu Feb 14 10:39:30 EST 2019
On Thu, Feb 14, 2019 at 10:49 AM Ronald Oussoren via Python-Dev <
python-dev at python.org> wrote:

> I usually use shutil.rmtree for tests that need to create temporary files,
> and create a temporary directory for those files (that is, use
> tempfile.mkdtemp in setUp() and use shutil.rmtree in tearDown()). That way
> I don’t have to adjust house-keeping code when I make changes to test code.
>

As tempfile provides context managers, should these be used internally for
something like this? Provide a decorator which passes in the temp file /
directory.

-- 
Joni Orponen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20190214/df7e9f53/attachment.html>
More information about the Python-Dev mailing list

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