Files
2125_GCE/tests/__pycache__/test_cognitive_kernel.cpython-314.pyc
T

63 lines
14 KiB
Plaintext
Raw Normal View History

2026-07-09 12:54:44 -04:00
+
ÿÜ0jí+ãó:Rt^RIt^RIt^RIHt]P
P
^]!]P!444^RI H
t
H t H t H
t
^RIHt^RIHtRRltRtR tR
tR tR tR
tRtRtRt]R8Xd]P<!]!44R#R#)zóTests for GlyphOS Cognitive Kernel
Tests verify:
- CognitiveKernel initialization and warmup
- GX execution through LAIN pipeline
- Result caching and accessors
- Glyph registry integration
- Functional API (singleton, run_gx, kernel_status)
ÚPath)ÚCognitiveKernelÚ
get_kernelÚrun_gxÚ
kernel_status)Úmain)Ú super_statscó$V^8„dQhR\/#)éÚreturnr)Úformats"Ú2/home/t420/2125_GCE/tests/test_cognitive_kernel.pyÚ __annotate__rs÷ñœñócó¢\R4pVP4'g \R4h\\P!44R, pVP4'dVP 4\
R\V4R\V4.4pV^8wd\RV 24hVP4'g \R4hV#)z[Create a test .gx file for kernel execution tests.
Returns:
Path to compiled .gx file
z/home/dave/sample_code.pyzSample code not foundztest_kernel.gxÚcompilez-oz"Compilation failed with exit code z'Compilation did not produce output file) rÚexistsÚFileNotFoundErrorÚtempfileÚ
gettempdirÚunlinkÚgx_mainÚstrÚ RuntimeError)ÚsourceÚtemp_gxÚ exit_codes rÚ_create_test_gxrôÐ
.€FØ =‰=?Š?ÜÐ 7Ó”8×)Ð,<Õ<€Gð‡~ÒØÔô˜¤C¨£K°´s¸7³|ÐE€IØA„~Üи >‰>× Ò ÜÐ €NrcóÊ\RR7pVf\R4R#VP'd\R4R#VPe\R4R#\R4R#)z$Test CognitiveKernel initialization.T©Úauto_load_glyphsz&FAIL: Could not create CognitiveKernelFz6FAIL: Kernel should not be warmed up on initializationz*FAIL: Last result should be None initiallyz+PASS: CognitiveKernel initializes correctly)rÚprintÚ
_warmed_upÚ _last_result)Úkernels rÚtest_kernel_initializationr&9sYä
¨dÔ
3€Fà

Ðà
××ÐÜ
Ðà
×ÑÒ
Ðä Ð
 rcóÞ\RR7pVP4VP'g\R4R#VPf\R4R#VP
f\R4R#VP
pVP
R4R8wd \R VP
R4 24R#VP
R
4'g\R 4R#\R VR, R
24R#)z%Test kernel warmup and glyph loading.Tr z$FAIL: Kernel not marked as warmed upFzFAIL: Startup time not recordedzFAIL: Glyph stats not cachedÚ total_glyphséXúFAIL: Expected 600 glyphs, got Úloadedz)FAIL: Glyph registry not marked as loadedzPASS: Kernel warmed up with z glyphs)rÚwarmupr#r"Ú
_startup_timeÚ_glyph_stats_cacheÚget)r%Ústatss rÚtest_kernel_warmupr1Mä
¨dÔ
3€Fà
‡MM„Oà × × Ð Ü
Ðà
×ÑÒ
Ðà
× Ñ Ò
Ðð
× %€EØ ‡yyÓ  
з ± ¸.Ó0IÐ/JÐà 9‰9 Ò Ü
Ðä Ð ¨~Õ)>Ð(?¸
 rcón\RR7pVP4\4pTP \
T4RR7pTf\ R 4R#.ROpTFpYS9gK \ R T 24R# TPR
/4pT'g\ R
4R#RT9d\ R4R#TPR /4pT'g\ R4R#\ R4R# \dp\ RT 24Rp?R#Rp?ii;i \dp\ RT 24Rp?R#Rp?ii;i)zTest kernel GX execution.Tr ú!FAIL: Could not create test .gx: NFÚanalyze©Úmodez#FAIL: execute_gx raised exception: zFAIL: execute_gx returned NoneÚ fused_symbolÚ diagnosticszFAIL: Missing key in result: zFAIL: fused_symbol is emptyÚsummaryz$FAIL: fused_symbol missing 'summary'zFAIL: diagnostics is emptyz7PASS: kernel.execute_gx() returns valid ExecutionResult)r7r8Úcognition_trace)rr,rÚ Exceptionr"Ú
execute_gxrr/)r%Úgx_pathÚresultÚ
required_keysÚkeyÚfusedÚdiagss rÚtest_kernel_execute_gxrDms'ä
¨dÔ