cpython: f646842023b3 (original) (raw)
Mercurial > cpython
changeset 80876:f646842023b3 3.3
#16664: Add regression tests for glob's behaviour concerning "."-entries Patch by Sebastian Kreft. [#16664]
Hynek Schlawack hs@ox.cx | |
---|---|
date | Sun, 16 Dec 2012 12:44:07 +0100 |
parents | 29becac5dd9b(current diff)29f0c45ce576(diff) |
children | 1fb39efcc3dd b90aa7f66e4a |
files | Lib/test/test_glob.py Misc/ACKS Misc/NEWS |
diffstat | 3 files changed, 11 insertions(+), 2 deletions(-)[+] [-] Lib/test/test_glob.py 7 Misc/ACKS 1 Misc/NEWS 5 |
line wrap: on
line diff
--- a/Lib/test/test_glob.py +++ b/Lib/test/test_glob.py @@ -5,6 +5,7 @@ import glob import os import shutil + class GlobTests(unittest.TestCase): def norm(self, *parts): @@ -18,9 +19,11 @@ class GlobTests(unittest.TestCase): create_empty_file(filename) def setUp(self):
self.tempdir = TESTFN+"_dir"[](#l1.15)
self.tempdir = TESTFN + "_dir"[](#l1.16) self.mktemp('a', 'D')[](#l1.17) self.mktemp('aab', 'F')[](#l1.18)
self.mktemp('.aa', 'G')[](#l1.19)
self.mktemp('.bb', 'H')[](#l1.20) self.mktemp('aaa', 'zzzF')[](#l1.21) self.mktemp('ZZZ')[](#l1.22) self.mktemp('a', 'bcd', 'EF')[](#l1.23)
@@ -66,6 +69,8 @@ class GlobTests(unittest.TestCase): eq = self.assertSequencesEqual_noorder eq(self.glob('a*'), map(self.norm, ['a', 'aab', 'aaa'])) eq(self.glob('*a'), map(self.norm, ['a', 'aaa']))
eq(self.glob('.*'), map(self.norm, ['.aa', '.bb']))[](#l1.28)
eq(self.glob('?aa'), map(self.norm, ['aaa']))[](#l1.29) eq(self.glob('aa?'), map(self.norm, ['aaa', 'aab']))[](#l1.30) eq(self.glob('aa[ab]'), map(self.norm, ['aaa', 'aab']))[](#l1.31) eq(self.glob('*q'), [])[](#l1.32)
--- a/Misc/ACKS +++ b/Misc/ACKS @@ -647,6 +647,7 @@ Jerzy Kozera Maksim Kozyarchuk Stefan Krah Bob Kras +Sebastian Kreft Holger Krekel Michael Kremer Fabian Kreutz
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -40,7 +40,7 @@ Core and Builtins
- Issue #9535: Fix pending signals that have been received but not yet handled by Python to not persist after os.fork() in the child process. -- Issue #15001: fix segfault on "del sys.module['main']". Patch by Victor +- Issue #15001: fix segfault on "del sys.modules['main']". Patch by Victor Stinner.
- Issue #8271: the utf-8 decoder now outputs the correct number of U+FFFD @@ -306,6 +306,9 @@ Library Tests ----- +- Issue #16664: Add regression tests for glob's behaviour concerning entries