File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11import asyncio
22import importlib
3+ import os
34import shutil
45from datetime import timedelta
56from pathlib import Path
1920
2021@pytest .fixture (scope = "session" , autouse = True )
2122def generate_rpc_client () -> None :
22- import tests .codegen .rpc .generated
23-
24- shutil .rmtree ("tests/codegen/rpc/generated" )
23+ shutil .rmtree ("tests/codegen/rpc/generated" , ignore_errors = True )
24+ os .makedirs ("tests/codegen/rpc/generated" )
2525
2626 def file_opener (path : Path ) -> TextIO :
2727 return open (path , "w" )
@@ -34,6 +34,12 @@ def file_opener(path: Path) -> TextIO:
3434 file_opener = file_opener ,
3535 method_filter = None ,
3636 )
37+
38+
39+ @pytest .fixture (scope = "session" , autouse = True )
40+ def reload_rpc_import (generate_rpc_client : None ) -> None :
41+ import tests .codegen .rpc .generated
42+
3743 importlib .reload (tests .codegen .rpc .generated )
3844
3945
You can’t perform that action at this time.
0 commit comments