Exemple #1
0
 def test_docs_from_tree_include_specific(self):
     tree = self.gitrepo.tree().join('test-content')
     expected = ['content.md', 'test.txt']
     actual = [
         x.name
         for x in docs_from_tree(tree, include=['content.md', 'test.txt'])
     ]
     self.assertEqual(actual, expected)
Exemple #2
0
 def test_docs_from_tree(self):
     tree = self.gitrepo.tree().join('test-content')
     expected = ['content.md', 'test.txt', 'unwanted.txt']
     actual = [x.name for x in docs_from_tree(tree)]
     self.assertEqual(actual, expected)
Exemple #3
0
 def test_docs_from_tree_include_subfolder(self):
     tree = self.gitrepo.tree().join('test-content/nested')
     expected = ['content.md']
     actual = [x.name for x in docs_from_tree(tree, include=['content.md'])]
     self.assertEqual(actual, expected)
 def test_docs_from_tree_exclude(self):
     tree = self.gitrepo.tree().join('test-content')
     expected = ['content.md', 'tekton.png']
     actual = [x.name for x in
         docs_from_tree(tree, exclude=['*.txt'])]
     self.assertEqual(actual, expected)