Skip to content

Commit 44bbe5e

Browse files
tobitegeiFurySt
andauthored
Fix agentskills tests (#2242)
* Fix agentskills tests * Improved test_agent_skill --------- Co-authored-by: Leo <[email protected]>
1 parent 0082640 commit 44bbe5e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/unit/test_agent_skill.py

+9
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,21 @@
2222
)
2323

2424

25+
# CURRENT_FILE must be reset for each test
26+
@pytest.fixture(autouse=True)
27+
def reset_current_file():
28+
from opendevin.runtime.plugins.agent_skills import agentskills
29+
30+
agentskills.CURRENT_FILE = None
31+
32+
2533
def test_open_file_unexist_path():
2634
with pytest.raises(FileNotFoundError):
2735
open_file('/unexist/path/a.txt')
2836

2937

3038
def test_open_file(tmp_path):
39+
assert tmp_path is not None
3140
temp_file_path = tmp_path / 'a.txt'
3241
temp_file_path.write_text('Line 1\nLine 2\nLine 3\nLine 4\nLine 5')
3342

0 commit comments

Comments
 (0)