Beispiel #1
0
 def test_is_included_single_path_not_matching(self):
     location = 'common/src/test/sample.txt'
     excludes = {'src/test/sample.txt': 'test ignore'}
     assert is_included(location, excludes=excludes)
Beispiel #2
0
 def test_is_included_dot_svn_with_excludes(self):
     incs = {'*/.svn/*': '.scanignore'}
     excs = {'*/.git/*': '.scanignore'}
     assert fileset.is_included('home/common/tools/elf/.svn/', incs, excs)
     assert fileset.is_included('home/common/tools/.svn/this', incs, excs)
     assert not fileset.is_included('home/common/.git/this', incs, excs)
Beispiel #3
0
 def test_is_included_glob_path(self):
     location = 'common/src/test/sample.txt'
     excludes = {'*/src/test/*': 'test ignore'}
     assert not is_included(location, excludes=excludes)
Beispiel #4
0
 def test_is_included_empty_exclusions(self):
     incs = {'/src/*': '.scanignore'}
     excs = {'': '.scanignore'}
     assert fileset.is_included('/src/dist/build/mylib.so', incs, excs)
Beispiel #5
0
 def test_is_included_is_included_exclusions_2(self):
     incs = {'src': '.scanignore'}
     excs = {'src/*.so': '.scanignore'}
     assert fileset.is_included('/some/src/this/that', incs, excs)
     assert not fileset.is_included('/src/dist/build/mylib.so', incs, excs)
Beispiel #6
0
 def test_is_included_basic(self):
     assert fileset.is_included('/common/src/', {}, {})
     assert fileset.is_included('/common/src/', None, None)
     assert not fileset.is_included(None, None, None)
Beispiel #7
0
 def test_is_included_single_file(self):
     location = 'common/src/test/sample.txt'
     excludes = {'sample.txt': 'test ignore'}
     assert not is_included(location, excludes=excludes)
 def test_is_included_sources(self):
     incs = {'/home/elf/elf-0.5/*': '.scanignore'}
     excs = {'/home/elf/elf-0.5/src/elf': '.scanignore',
             '/home/elf/elf-0.5/src/elf.o': '.scanignore'}
     assert not fileset.is_included('/home/elf/elf-0.5/src/elf', incs, excs)