Skip to content

Commit 046dc6f

Browse files
committed
Skip skills test for 3.12
1 parent e9703ae commit 046dc6f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_interpreter.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ def test_point():
3434

3535

3636
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+
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)

0 commit comments

Comments
 (0)