TEST-INFRA: [test-data-quality] Improve test data quality in mako/testing/fixtures.py #5842

Open
opened 2026-04-09 10:34:15 +00:00 by HAL9000 · 1 comment
Owner

Description

The test fixtures in mako/testing/fixtures.py could be improved to provide more robust and realistic test data. The current implementation relies on file-based templates, but the file paths are constructed manually, and the variety of templates is limited.

Proposed Changes

  1. Use a more robust method for locating test data files. Using a library like importlib.resources would make the tests more reliable and less prone to breaking when files are moved.
  2. Create a wider variety of templates to improve test coverage. This could include templates with complex inheritance hierarchies, templates that use a variety of control structures, and templates that test different caching scenarios.
  3. Use a snapshot testing library to manage the expected output of the rendered templates. This would make it easier to update the expected output when the template changes, and it would also make it easier to review the changes to the expected output.

Duplicate Check

  • Search query: "test data quality", "fixtures", "mako"
  • Results: 0
  • Reasoning: No existing issues address the specific improvements proposed in this issue.

Backlog note: This issue was discovered during autonomous operation
on milestone . It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: new-issue-creator

### Description The test fixtures in `mako/testing/fixtures.py` could be improved to provide more robust and realistic test data. The current implementation relies on file-based templates, but the file paths are constructed manually, and the variety of templates is limited. ### Proposed Changes 1. **Use a more robust method for locating test data files.** Using a library like `importlib.resources` would make the tests more reliable and less prone to breaking when files are moved. 2. **Create a wider variety of templates to improve test coverage.** This could include templates with complex inheritance hierarchies, templates that use a variety of control structures, and templates that test different caching scenarios. 3. **Use a snapshot testing library to manage the expected output of the rendered templates.** This would make it easier to update the expected output when the template changes, and it would also make it easier to review the changes to the expected output. ### Duplicate Check - Search query: "test data quality", "fixtures", "mako" - Results: 0 - Reasoning: No existing issues address the specific improvements proposed in this issue. > **Backlog note:** This issue was discovered during autonomous operation > on milestone <M>. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: new-issue-creator
Author
Owner

⚠️ Orphan Issue — Needs Manual Linking

No parent Epic was provided when this issue was created. Per CONTRIBUTING.md, every issue must be linked to a parent Epic using Forgejo's dependency system (child issue blocks parent Epic).

Action required: A human reviewer or the backlog-groomer agent should identify the appropriate parent Epic for this test infrastructure improvement and create the dependency link:

# Child issue BLOCKS parent Epic — correct direction
curl -s -X POST "https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/issues/5842/blocks" \
  -H "Authorization: token <FORGEJO_PAT>" \
  -H "Content-Type: application/json" \
  -d '{"owner": "cleveragents", "repo": "cleveragents-core", "index": <PARENT_EPIC_NUMBER>}'

This issue is in the backlog (Priority/Backlog) and does not block any active milestone work.


Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: new-issue-creator

⚠️ **Orphan Issue — Needs Manual Linking** No parent Epic was provided when this issue was created. Per CONTRIBUTING.md, every issue must be linked to a parent Epic using Forgejo's dependency system (child issue **blocks** parent Epic). **Action required:** A human reviewer or the backlog-groomer agent should identify the appropriate parent Epic for this test infrastructure improvement and create the dependency link: ```bash # Child issue BLOCKS parent Epic — correct direction curl -s -X POST "https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/issues/5842/blocks" \ -H "Authorization: token <FORGEJO_PAT>" \ -H "Content-Type: application/json" \ -d '{"owner": "cleveragents", "repo": "cleveragents-core", "index": <PARENT_EPIC_NUMBER>}' ``` This issue is in the backlog (`Priority/Backlog`) and does not block any active milestone work. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: new-issue-creator
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#5842
No description provided.