コード例 #1
0
 def test_select_include_any_tags(self):
     config = selector._SelectorConfig(roots=[
         "dir/subdir1/*.js", "dir/subdir2/*.js", "dir/subdir3/a/*.js"
     ],
                                       include_with_any_tags=["tag1"])
     selected = self.selector.select(config)
     self.assertEqual([], selected)
コード例 #2
0
 def test_select_include_files(self):
     config = selector._SelectorConfig(
         roots=[
             "dir/subdir1/*.js", "dir/subdir2/*.js", "dir/subdir3/a/*.js"
         ],
         include_files=["dir/subdir2/test21.js"])
     selected = self.selector.select(config)
     self.assertEqual(["dir/subdir2/test21.js"], selected)
コード例 #3
0
ファイル: test_selector.py プロジェクト: ShaneHarvey/mongo
 def test_select_include_files(self):
     config = selector._SelectorConfig(
         roots=["dir/subdir1/*.js", "dir/subdir2/*.js",
                "dir/subdir3/a/*.js"], include_files=["dir/subdir2/test21.js"])
     selected, excluded = self.selector.select(config)
     self.assertEqual(["dir/subdir2/test21.js"], selected)
     self.assertEqual(
         ["dir/subdir1/test11.js", "dir/subdir1/test12.js", "dir/subdir3/a/test3a1.js"],
         excluded)
コード例 #4
0
 def test_select_all(self):
     config = selector._SelectorConfig(roots=[
         "dir/subdir1/*.js", "dir/subdir2/*.js", "dir/subdir3/a/*.js"
     ])
     selected = self.selector.select(config)
     self.assertEqual([
         "dir/subdir1/test11.js", "dir/subdir1/test12.js",
         "dir/subdir2/test21.js", "dir/subdir3/a/test3a1.js"
     ], selected)
コード例 #5
0
 def test_select_include_tags(self):
     config = selector._SelectorConfig(
         roots=["dir/subdir1/*.js", "dir/subdir2/*.js", "dir/subdir3/a/*.js"],
         include_tags="tag1")
     selected, excluded = self.selector.select(config)
     self.assertEqual([], selected)
     self.assertEqual([
         "dir/subdir1/test11.js", "dir/subdir1/test12.js", "dir/subdir2/test21.js",
         "dir/subdir3/a/test3a1.js"
     ], excluded)
コード例 #6
0
ファイル: test_selector.py プロジェクト: ShaneHarvey/mongo
 def test_include_exclude_tags(self):
     with self.assertRaises(ValueError):
         selector._SelectorConfig(include_tags="tag1", exclude_tags="tag2")
コード例 #7
0
ファイル: test_selector.py プロジェクト: ShaneHarvey/mongo
 def test_root_roots(self):
     with self.assertRaises(ValueError):
         selector._SelectorConfig(root="path_to_root", roots=["test1", "test2"])
コード例 #8
0
 def test_include_exclude_tags(self):
     with self.assertRaises(ValueError):
         selector._SelectorConfig(include_tags="tag1", exclude_tags="tag2")
コード例 #9
0
 def test_root_roots(self):
     with self.assertRaises(ValueError):
         selector._SelectorConfig(root="path_to_root",
                                  roots=["test1", "test2"])