diff options
Diffstat (limited to 'Lib/test/test_repr.py')
| -rw-r--r-- | Lib/test/test_repr.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/test_repr.py b/Lib/test/test_repr.py index 6284f40..1094816 100644 --- a/Lib/test/test_repr.py +++ b/Lib/test/test_repr.py @@ -211,10 +211,6 @@ def touch(path, text=''): fp.write(text) fp.close() -def zap(actions, dirname, names): - for name in names: - actions.append(os.path.join(dirname, name)) - class LongReprTest(unittest.TestCase): def setUp(self): longname = 'areallylongpackageandmodulenametotestreprtruncation' @@ -233,7 +229,9 @@ class LongReprTest(unittest.TestCase): def tearDown(self): actions = [] - os.path.walk(self.pkgname, zap, actions) + for dirpath, dirnames, filenames in os.walk(self.pkgname): + for name in dirnames + filenames: + actions.append(os.path.join(dirpath, name)) actions.append(self.pkgname) actions.sort() actions.reverse() |
