aboutsummaryrefslogtreecommitdiff
path: root/llm/codeinterpreter/python/python_test.go
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-08-01 19:25:46 -0400
committerXe Iaso <me@xeiaso.net>2024-08-01 19:25:46 -0400
commitbdcd9eb26211bb5b10b1c41a2ffc609933d46033 (patch)
tree3a69390ea9c377518e8e4ab44893918c4bebd969 /llm/codeinterpreter/python/python_test.go
parent7041695d49386f6e2cf660179c55f7f8a93b5ed3 (diff)
downloadx-bdcd9eb26211bb5b10b1c41a2ffc609933d46033.tar.xz
x-bdcd9eb26211bb5b10b1c41a2ffc609933d46033.zip
cmd/mimi: try having mimi run Python
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'llm/codeinterpreter/python/python_test.go')
-rw-r--r--llm/codeinterpreter/python/python_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/llm/codeinterpreter/python/python_test.go b/llm/codeinterpreter/python/python_test.go
new file mode 100644
index 0000000..7b22f65
--- /dev/null
+++ b/llm/codeinterpreter/python/python_test.go
@@ -0,0 +1,22 @@
+package python
+
+import (
+ "context"
+ "testing"
+)
+
+func TestRun(t *testing.T) {
+ var code = `import sys
+
+print(f"Python {sys.version} running in {sys.platform}/wazero.")`
+
+ dir := t.TempDir()
+
+ res, err := Run(context.Background(), dir, code)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ t.Logf("stdout: %s", res.Stdout)
+ t.Logf("stderr: %s", res.Stderr)
+}