diff options
author | Larry Hastings <larry@hastings.org> | 2012-07-15 17:57:38 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2012-07-15 17:57:38 (GMT) |
commit | b40380667c98a3ab7e244e036944f731d61ffc27 (patch) | |
tree | bfb57dbbb5fea7e9398adf44366953c86f8462f4 /Lib/test/test_os.py | |
parent | 509d87d4a06f2812c82df9b2fab83272f6463a81 (diff) | |
download | cpython-b40380667c98a3ab7e244e036944f731d61ffc27.zip cpython-b40380667c98a3ab7e244e036944f731d61ffc27.tar.gz cpython-b40380667c98a3ab7e244e036944f731d61ffc27.tar.bz2 |
Issue #15202: Consistently use the name "follow_symlinks" for
new parameters in os and shutil functions. Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 7c73f1e..5c0b0c8 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -758,10 +758,11 @@ class FwalkTests(WalkTests): """ compare with walk() results. """ - for topdown, followlinks in itertools.product((True, False), repeat=2): - d = {'topdown': topdown, 'followlinks': followlinks} - walk_kwargs.update(d) - fwalk_kwargs.update(d) + walk_kwargs = walk_kwargs.copy() + fwalk_kwargs = fwalk_kwargs.copy() + for topdown, follow_symlinks in itertools.product((True, False), repeat=2): + walk_kwargs.update(topdown=topdown, followlinks=follow_symlinks) + fwalk_kwargs.update(topdown=topdown, follow_symlinks=follow_symlinks) expected = {} for root, dirs, files in os.walk(**walk_kwargs): @@ -787,9 +788,9 @@ class FwalkTests(WalkTests): def test_yields_correct_dir_fd(self): # check returned file descriptors - for topdown, followlinks in itertools.product((True, False), repeat=2): - args = support.TESTFN, topdown, None, followlinks - for root, dirs, files, rootfd in os.fwalk(*args): + for topdown, follow_symlinks in itertools.product((True, False), repeat=2): + args = support.TESTFN, topdown, None + for root, dirs, files, rootfd in os.fwalk(*args, follow_symlinks=follow_symlinks): # check that the FD is valid os.fstat(rootfd) # redundant check |