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 2
2
3
3
import inspect
4
4
import os
5
+ import shutil
5
6
from typing import Any , List
6
7
7
8
import pytest
11
12
from selenium .webdriver .support .ui import WebDriverWait
12
13
13
14
import idom
15
+ from idom .config import IDOM_WED_MODULES_DIR
14
16
from idom .testing import ServerMountPoint , create_simple_selenium_web_driver
15
17
16
18
@@ -102,6 +104,15 @@ def driver_is_headless(pytestconfig: Config):
102
104
return bool (pytestconfig .option .headless )
103
105
104
106
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
+
105
116
def _mark_coros_as_async_tests (items : List [pytest .Item ]) -> None :
106
117
for item in items :
107
118
if isinstance (item , pytest .Function ):
You can’t perform that action at this time.
0 commit comments