diff options
author | Hynek Schlawack <hs@ox.cx> | 2012-12-16 11:46:58 (GMT) |
---|---|---|
committer | Hynek Schlawack <hs@ox.cx> | 2012-12-16 11:46:58 (GMT) |
commit | 0bb8d8c4c968aa8cf780bd5a38ae5873e23b5353 (patch) | |
tree | b5554505b66f747ce2c7881e874397c79e4022ba | |
parent | 8031d0dfd4c79509badaf960b3aba1dbdba94cbd (diff) | |
parent | 9ca589333844997713394b65dba9548c5887e750 (diff) | |
download | cpython-0bb8d8c4c968aa8cf780bd5a38ae5873e23b5353.zip cpython-0bb8d8c4c968aa8cf780bd5a38ae5873e23b5353.tar.gz cpython-0bb8d8c4c968aa8cf780bd5a38ae5873e23b5353.tar.bz2 |
#16664: Add regression tests for glob's behaviour concerning "."-entries
Patch by Sebastian Kreft.
-rw-r--r-- | Lib/test/test_glob.py | 7 | ||||
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS | 5 |
3 files changed, 11 insertions, 2 deletions
diff --git a/Lib/test/test_glob.py b/Lib/test/test_glob.py index 6ee08db..806f26b 100644 --- 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" + self.tempdir = TESTFN + "_dir" self.mktemp('a', 'D') self.mktemp('aab', 'F') + self.mktemp('.aa', 'G') + self.mktemp('.bb', 'H') self.mktemp('aaa', 'zzzF') self.mktemp('ZZZ') self.mktemp('a', 'bcd', 'EF') @@ -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'])) + eq(self.glob('?aa'), map(self.norm, ['aaa'])) eq(self.glob('aa?'), map(self.norm, ['aaa', 'aab'])) eq(self.glob('aa[ab]'), map(self.norm, ['aaa', 'aab'])) eq(self.glob('*q'), []) @@ -650,6 +650,7 @@ Jerzy Kozera Maksim Kozyarchuk Stefan Krah Bob Kras +Sebastian Kreft Holger Krekel Michael Kremer Fabian Kreutz @@ -67,7 +67,7 @@ Core and Builtins - Issue #14794: Fix slice.indices to return correct results for huge values, rather than raising OverflowError. -- 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 @@ -470,6 +470,9 @@ Extension Modules Tests ----- +- Issue #16664: Add regression tests for glob's behaviour concerning entries + starting with a ".". Patch by Sebastian Kreft. + - Issue #13390: The ``-R`` option to regrtest now also checks for memory allocation leaks, using :func:`sys.getallocatedblocks()`. |