File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 22
33import inspect
44import os
5+ import shutil
56from typing import Any , List
67
78import pytest
1112from selenium .webdriver .support .ui import WebDriverWait
1213
1314import idom
15+ from idom .config import IDOM_WED_MODULES_DIR
1416from idom .testing import ServerMountPoint , create_simple_selenium_web_driver
1517
1618
@@ -102,6 +104,15 @@ def driver_is_headless(pytestconfig: Config):
102104 return bool (pytestconfig .option .headless )
103105
104106
107+ @pytest .fixture (autouse = True )
108+ def _clear_web_modules_dir_after_test ():
109+ for path in IDOM_WED_MODULES_DIR .current .iterdir ():
110+ if path .is_dir ():
111+ shutil .rmtree (path )
112+ else :
113+ path .unlink ()
114+
115+
105116def _mark_coros_as_async_tests (items : List [pytest .Item ]) -> None :
106117 for item in items :
107118 if isinstance (item , pytest .Function ):
You can’t perform that action at this time.
0 commit comments