#!/usr/bin/env python3 """ Tests for test.example Generated by meta.skill """ import pytest import sys import os from pathlib import Path # Add parent directory to path sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))) from skills.test_example import test_example class TestTestExample: """Tests for TestExample""" def setup_method(self): """Setup test fixtures""" self.skill = test_example.TestExample() def test_initialization(self): """Test skill initializes correctly""" assert self.skill is not None assert self.skill.base_dir is not None def test_execute_basic(self): """Test basic execution""" result = self.skill.execute() assert result is not None assert "ok" in result assert "status" in result def test_execute_success(self): """Test successful execution""" result = self.skill.execute() assert result["ok"] is True assert result["status"] == "success" # TODO: Add more specific tests based on skill functionality def test_cli_help(capsys): """Test CLI help message""" sys.argv = ["test_example.py", "--help"] with pytest.raises(SystemExit) as exc_info: test_example.main() assert exc_info.value.code == 0 captured = capsys.readouterr() assert "A simple test skill for validating the meta.create" in captured.out if __name__ == "__main__": pytest.main([__file__, "-v"])