예제 #1
0
 def test_default(self):
     self.assertPathListEqual(find.find(self.env, '**'), [
         srcpath('file.cpp'),
         srcpath('file.cpp~'),
         srcpath('dir/file2.txt')
     ])
     self.assertPathListEqual(find.find(self.env, '**/'), [
         srcpath('./'),
         srcpath('dir/'),
         srcpath('dir2/'),
         srcpath('dir/sub/')
     ])
예제 #2
0
 def test_flat(self):
     with mock_context():
         self.assertEqual(
             find.find(self.env, flat=True),
             [srcpath('.'),
              srcpath('dir'),
              srcpath('file.cpp')])
예제 #3
0
 def test_dir(self):
     self.assertPathListEqual(find.find(self.env, '**', type='d'), [
         srcpath('./'),
         srcpath('dir/'),
         srcpath('dir2/'),
         srcpath('dir/sub/')
     ])
예제 #4
0
 def test_default(self):
     with mock_context():
         self.assertEqual(find.find(self.env), [
             srcpath('.'),
             srcpath('dir'),
             srcpath('file.cpp'),
             srcpath('dir/file2.txt')
         ])
예제 #5
0
 def test_dir(self):
     with mock_context():
         self.assertEqual(find.find(self.env, type='d'),
                          [srcpath('.'), srcpath('dir')])
예제 #6
0
 def test_file(self):
     with mock_context():
         self.assertEqual(find.find(self.env, type='f'),
                          [srcpath('file.cpp'),
                           srcpath('dir/file2.txt')])
예제 #7
0
 def test_multiple_patterns(self):
     self.assertPathListEqual(
         find.find(self.env, ['*.cpp', 'dir/*.txt']),
         [srcpath('file.cpp'),
          srcpath('dir/file2.txt')])
예제 #8
0
 def test_file(self):
     self.assertPathListEqual(find.find(self.env, '**', type='f'), [
         srcpath('file.cpp'),
         srcpath('file.cpp~'),
         srcpath('dir/file2.txt')
     ])