Skip to content

Commit

Permalink
Add sync test to dtd and skip async test
Browse files Browse the repository at this point in the history
  • Loading branch information
ayjayt committed Sep 27, 2024
1 parent 1a12ff5 commit 6768fff
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion devtools/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,23 @@ def diagnose():
finally:
print("Done with version info.".center(50, "*"))
pass
try:
print("Sync test".center(50, "*"))
import time
browser = Browser(debug=True, debug_browser=True)
time.sleep(2)
browser.close()
finally:
print("Done with sync test".center(50, "*"))

async def test():
browser = await Browser(debug=True, debug_browser=True)
await asyncio.sleep(2)
await browser.close()
try:
print("Running Asyncio Test".center(50, "*"))
asyncio.run(test())
#asyncio.run(test())
print("Skipped...")
finally:
print("Asyncio.run done".center(50, "*"))
pass
Expand Down

0 comments on commit 6768fff

Please sign in to comment.