示例#1
0
 def test_files_in_subdir_with_exclude(self):
     self._create_dir('tests')
     foo_txt = self._create_file('tests', 'foo.txt')
     bar_txt = self._create_file('tests', 'bar.txt')
     fileset = FileSet(self.basedir, include='tests/*.txt', exclude='bar.*')
     assert foo_txt in fileset and bar_txt not in fileset
示例#2
0
 def test_top_level_files(self):
     foo_txt = self._create_file('foo.txt')
     bar_txt = self._create_file('bar.txt')
     fileset = FileSet(self.basedir)
     assert foo_txt in fileset and bar_txt in fileset
示例#3
0
 def test_files_in_subdir(self):
     self._create_dir('tests')
     foo_txt = self._create_file('tests', 'foo.txt')
     bar_txt = self._create_file('tests', 'bar.txt')
     fileset = FileSet(self.basedir)
     assert foo_txt in fileset and bar_txt in fileset
示例#4
0
 def test_empty(self):
     fileset = FileSet(self.basedir)
     self.assertRaises(StopIteration, iter(fileset).next)