[issue38223] Reorganize test_shutil

Serhiy Storchaka report at bugs.python.org
Thu Sep 19 05:37:09 EDT 2019


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

Currently most shutil tests are in a single class. Tests for the same function are partially grouped together and partially intermixed with other tests. This makes hard to find an appropriate place for adding new tests and increase risk of hiding test by other test with the same name.

The proposed PR reorganized shutil tests. Added separate classes for particular functions and groups of related functions. It also cleans up some code: creating temporary dirs and monkey-patching shutil.open. test.support.rmtree() is used instead of shutil.rmtree() for cleaning up temporary dirs (it is more reliable for testing purposes).

I am going to add new tests, so I need to clean up the existing code first.

----------
components: Tests
messages: 352777
nosy: giampaolo.rodola, serhiy.storchaka, tarek
priority: normal
severity: normal
status: open
title: Reorganize test_shutil
type: enhancement
versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38223>
_______________________________________


More information about the Python-bugs-list mailing list