Skip to content

Commit 14405eb

Browse files
committed
Enhance vfb call processing in extract_code_blocks to handle exceptions for get_templates and performance test terms
1 parent 8cb71ec commit 14405eb

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/test/readme_parser.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@ def extract_code_blocks(readme_path):
2828
vfb_calls = re.findall(r'(vfb\.[^)]*\))', block)
2929
if vfb_calls:
3030
# Add force_refresh=True to each call to ensure fresh data in tests
31-
# Exception: get_templates() doesn't support force_refresh (no SOLR cache)
31+
# Exceptions:
32+
# - get_templates() doesn't support force_refresh (no SOLR cache)
33+
# - Performance test terms (FBbt_00003748, VFB_00101567) should use cache
3234
for call in vfb_calls:
3335
# Check if this is get_templates() - if so, don't add force_refresh
3436
if 'get_templates' in call:
3537
processed_python_blocks.append(call)
3638
continue
3739

40+
# Check if this call uses performance test terms - skip force_refresh for those
41+
if 'FBbt_00003748' in call or 'VFB_00101567' in call:
42+
processed_python_blocks.append(call)
43+
continue
44+
3845
# Check if the call already has parameters
3946
if '(' in call and ')' in call:
4047
# Insert force_refresh=True before the closing parenthesis

0 commit comments

Comments
 (0)