Commit 4ca90288 authored by Frank Sauerburger's avatar Frank Sauerburger

Remove manifest from input file list

parent f8838931
Pipeline #4252 passed with stages
in 1 minute and 5 seconds
......@@ -31,8 +31,12 @@ def filter_file_list(file_list):
from the list.
"""
for filepath in file_list:
if not filepath.startswith(".git/"):
yield filepath
if filepath.startswith(".git/"):
continue
if filepath == ".gitemplet.yml":
continue
yield filepath
def resolve(text, context):
"""
......
......@@ -112,6 +112,27 @@ class FilterListTest(unittest.TestCase):
"something/other/file_c",
"yet_different/file_e"])
def test_manifest(self):
"""
Check that the manifest is removed from the list.
"""
filtered_list = filter_file_list(
["file_a",
"file_b",
".gitemplet.yml",
"something/file_a",
"something/file_c",
"something/file_d",
"something/other/file_c",
"yet_different/file_e"])
self.assertEqual(sorted(filtered_list),
["file_a",
"file_b",
"something/file_a",
"something/file_c",
"something/file_d",
"something/other/file_c",
"yet_different/file_e"])
class FileListTest(unittest.TestCase):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment