aboutsummaryrefslogtreecommitdiff
path: root/llm/codeinterpreter/python/python_test.go
diff options
context:
space:
mode:
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)
+}