File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ def test_point():
34
34
35
35
36
36
def test_skills ():
37
+
38
+ import sys
39
+ if sys .version_info [:2 ] == (3 , 12 ):
40
+ print ("skills.search is only for python 3.11 for now, because it depends on unstructured. skipping this test." )
41
+ return
42
+
37
43
import json
38
44
39
45
interpreter .model = "gpt-3.5"
@@ -48,6 +54,8 @@ def test_skills():
48
54
# skills_path = '/01OS/server/skills'
49
55
# interpreter.computer.skills.path = skills_path
50
56
print (interpreter .computer .skills .path )
57
+ for file in os .listdir (interpreter .computer .skills .path ):
58
+ os .remove (os .path .join (interpreter .computer .skills .path , file ))
51
59
print ("Path: " , interpreter .computer .skills .path )
52
60
print ("Files in the path: " )
53
61
interpreter .computer .run ("python" , "def testing_skilsl():\n print('hi')" )
@@ -57,7 +65,9 @@ def test_skills():
57
65
print ("Files in the path: " )
58
66
for file in os .listdir (interpreter .computer .skills .path ):
59
67
print (file )
68
+
60
69
skills = interpreter .computer .skills .search (query )
70
+
61
71
lowercase_skills = [skill [0 ].lower () + skill [1 :] for skill in skills ]
62
72
output = "\\ n" .join (lowercase_skills )
63
73
assert "testing_skilsl" in str (output )
You can’t perform that action at this time.
0 commit comments