Skip to content

Commit 8dc7fa8

Browse files
Fix: Consumer tests not handling all override (#500)
Based on the Work from: @ANegm-ETAS His PR #490 in Docs-as-Code Co-authored-by: Negm Adham (ETAS) <Adham.Negm@etas.com>
1 parent ef6ecba commit 8dc7fa8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/tests/test_consumer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ def filter_repos(repo_filter: str | None) -> list[ConsumerRepo]:
199199

200200
def comment_out_git_override(module_content: str) -> str:
201201
"""
202-
Comment out existing git_override blocks for score_docs_as_code only.
202+
Comment out existing override blocks for score_docs_as_code only.
203+
Handles git_override, single_version_override, local_path_override, archive_override, etc.
203204
"""
204205
lines = module_content.splitlines()
205206
result = []
@@ -209,7 +210,7 @@ def comment_out_git_override(module_content: str) -> str:
209210
line = lines[i]
210211

211212
# Check if this line starts a git_override block
212-
if re.match(r"^\s*git_override\s*\(", line):
213+
if re.match(r"^\s*\w+_override\s*\(", line):
213214
# Collect the entire block
214215
block_start = i
215216
depth = line.count("(") - line.count(")")

0 commit comments

Comments
 (0)