コード例 #1
0
 def test_apply_exclude_neg_seq(self):
     names = ["baxfoo", "bazfoo", "barfoo"]
     patterns = ["ba[!r]foo"]
     expected = ["barfoo"]
     result = _apply_exclude_patterns(names, patterns)
     self.assertListEqual(result, expected)
コード例 #2
0
 def test_apply_exclude_multiple_star(self):
     names = ["foo", "bar", "baz"]
     patterns = ["*a*"]
     expected = ["foo"]
     result = _apply_exclude_patterns(names, patterns)
     self.assertListEqual(result, expected)
コード例 #3
0
 def test_apply_exclude_question_mark(self):
     names = ["foo", "bazfoo", "barfoo"]
     patterns = ["ba?foo"]
     expected = ["foo"]
     result = _apply_exclude_patterns(names, patterns)
     self.assertListEqual(result, expected)
コード例 #4
0
 def test_apply_exclude_all(self):
     names = ["foo", "bar", "baz"]
     patterns = ["*"]
     expected = []
     result = _apply_exclude_patterns(names, patterns)
     self.assertListEqual(sorted(result), sorted(expected))