MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / setUp

Method setUp

tests/test_json_plugin.py:42–65  ·  view source on GitHub ↗

Set up test fixtures.

(self)

Source from the content-addressed store, hash-verified

40 """Test cases for the JSON plugin with new outlines API."""
41
42 def setUp(self):
43 """Set up test fixtures."""
44 # Sample JSON schemas for testing
45 self.simple_schema = json.dumps({
46 "type": "object",
47 "properties": {
48 "name": {"type": "string"},
49 "age": {"type": "integer"},
50 "active": {"type": "boolean"}
51 },
52 "required": ["name", "age"]
53 })
54
55 self.complex_schema = json.dumps({
56 "type": "object",
57 "properties": {
58 "id": {"type": "integer"},
59 "email": {"type": "string"},
60 "score": {"type": "number"},
61 "tags": {"type": "array"},
62 "metadata": {"type": "object"}
63 },
64 "required": ["id", "email"]
65 })
66
67 @patch('optillm.plugins.json_plugin.outlines.from_transformers')
68 @patch('optillm.plugins.json_plugin.AutoTokenizer.from_pretrained')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected