Agent skill

office-docs-testing-document-generation

Sub-skill of office-docs: Testing Document Generation.

Stars 4
Forks 4

Install this agent skill to your Project

npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/data/office/office-docs/testing-document-generation

SKILL.md

Testing Document Generation

Testing Document Generation

python
import pytest
from docx import Document

def test_report_generation():
    """Test report document structure."""
    generate_report(sample_data, 'test_output.docx')

    doc = Document('test_output.docx')

    # Verify structure
    assert len(doc.paragraphs) > 0
    assert doc.paragraphs[0].text == 'Monthly Report'

    # Verify tables
    assert len(doc.tables) == 1
    assert len(doc.tables[0].rows) == 4

def test_template_rendering():
    """Test template variable substitution."""
    context = {'name': 'Test Corp', 'amount': '$1000'}

    doc = DocxTemplate('template.docx')
    doc.render(context)
    doc.save('output.docx')

*See sub-skills for full details.*

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results