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():
3434
3535
3636def 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+
3743 import json
3844
3945 interpreter .model = "gpt-3.5"
@@ -48,6 +54,8 @@ def test_skills():
4854 # skills_path = '/01OS/server/skills'
4955 # interpreter.computer.skills.path = skills_path
5056 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 ))
5159 print ("Path: " , interpreter .computer .skills .path )
5260 print ("Files in the path: " )
5361 interpreter .computer .run ("python" , "def testing_skilsl():\n print('hi')" )
@@ -57,7 +65,9 @@ def test_skills():
5765 print ("Files in the path: " )
5866 for file in os .listdir (interpreter .computer .skills .path ):
5967 print (file )
68+
6069 skills = interpreter .computer .skills .search (query )
70+
6171 lowercase_skills = [skill [0 ].lower () + skill [1 :] for skill in skills ]
6272 output = "\\ n" .join (lowercase_skills )
6373 assert "testing_skilsl" in str (output )
You can’t perform that action at this time.
0 commit comments