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 af66e97..ac1a0a0 100644 --- a/Lib/test/test_repr.py +++ b/Lib/test/test_repr.py @@ -197,10 +197,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' @@ -219,7 +215,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() |
