11from pydantic import BaseModel
22from scrapybara import Scrapybara
33import os
4+ import pytest
45
56from scrapybara .anthropic import Anthropic
67from scrapybara .prompts import (
@@ -47,7 +48,7 @@ def test_ubuntu() -> None:
4748 EditTool (ubuntu_instance ),
4849 ],
4950 schema = YCStats ,
50- on_step = lambda step : print (step ),
51+ on_step = lambda step : print (step . text , step . tool_calls ),
5152 )
5253 print (response )
5354 assert response .output is not None
@@ -77,7 +78,8 @@ def test_browser() -> None:
7778 tools = [
7879 ComputerTool (browser_instance ),
7980 ],
80- on_step = lambda step : print (step ),
81+ schema = YCStats ,
82+ on_step = lambda step : print (step .text , step .tool_calls ),
8183 )
8284 print (response )
8385 assert response .output is not None
@@ -86,6 +88,7 @@ def test_browser() -> None:
8688 browser_instance .stop ()
8789
8890
91+ @pytest .mark .skip ()
8992def test_windows () -> None :
9093 _check_api_key ()
9194 client = Scrapybara (
@@ -104,7 +107,8 @@ def test_windows() -> None:
104107 tools = [
105108 ComputerTool (windows_instance ),
106109 ],
107- on_step = lambda step : print (step ),
110+ schema = YCStats ,
111+ on_step = lambda step : print (step .text , step .tool_calls ),
108112 )
109113 print (response )
110114 assert response .output is not None
@@ -116,4 +120,4 @@ def test_windows() -> None:
116120if __name__ == "__main__" :
117121 test_ubuntu ()
118122 test_browser ()
119- test_windows ()
123+ # test_windows()
0 commit comments