import os
import shutil
+
class GlobTests(unittest.TestCase):
def norm(self, *parts):
f.close()
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')
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'), [])
Tests
-----
+- Issue #16664: Add regression tests for glob's behaviour concerning entries
+ starting with a ".". Patch by Sebastian Kreft.
+
- Issue #15747: ZFS always returns EOPNOTSUPP when attempting to set the
UF_IMMUTABLE flag (via either chflags or lchflags); refactor affected
tests in test_posix.py to account for this.