@@ -209,6 +209,7 @@ def docker_tests_enabled(self) -> (bool, str):
209
209
@classmethod
210
210
def setUpClass (cls ):
211
211
script_dir = pathlib .Path (cls .get_script_dir ())
212
+ is_unit_test = True if 'unittests' in script_dir .parts else False
212
213
213
214
docker_tests_enabled , sku = cls .docker_tests_enabled ()
214
215
@@ -228,7 +229,7 @@ def setUpClass(cls):
228
229
cls .webhost = \
229
230
WebHostDedicated (docker_configs ).spawn_container ()
230
231
else :
231
- _setup_func_app (TESTS_ROOT / script_dir )
232
+ _setup_func_app (TESTS_ROOT / script_dir , is_unit_test )
232
233
try :
233
234
cls .webhost = start_webhost (script_dir = script_dir ,
234
235
stdout = cls .host_stdout )
@@ -1014,7 +1015,7 @@ def _symlink_dir(src, dst):
1014
1015
dst .symlink_to (src , target_is_directory = True )
1015
1016
1016
1017
1017
- def _setup_func_app (app_root ):
1018
+ def _setup_func_app (app_root , is_unit_test ):
1018
1019
extensions = app_root / 'bin'
1019
1020
host_json = app_root / 'host.json'
1020
1021
extensions_csproj_file = app_root / 'extensions.csproj'
@@ -1023,11 +1024,11 @@ def _setup_func_app(app_root):
1023
1024
with open (host_json , 'w' ) as f :
1024
1025
f .write (HOST_JSON_TEMPLATE )
1025
1026
1026
- if not os .path .isfile (extensions_csproj_file ):
1027
+ if not os .path .isfile (extensions_csproj_file ) and not is_unit_test :
1027
1028
with open (extensions_csproj_file , 'w' ) as f :
1028
1029
f .write (AZURE_EXTENSIONS )
1029
1030
1030
- _symlink_dir (EXTENSIONS_PATH , extensions )
1031
+ _symlink_dir (EXTENSIONS_PATH , extensions )
1031
1032
1032
1033
1033
1034
def _teardown_func_app (app_root ):
0 commit comments