@@ -66,9 +66,9 @@ def get_redisai_env(
6666 """
6767 env = os .environ .copy ()
6868 if rai_path is not None :
69- env ["RAI_PATH " ] = rai_path
69+ env ["SMARTSIM_RAI_LIB " ] = rai_path
7070 else :
71- env .pop ("RAI_PATH " , None )
71+ env .pop ("SMARTSIM_RAI_LIB " , None )
7272
7373 if lib_path is not None :
7474 env ["SMARTSIM_DEP_INSTALL_PATH" ] = lib_path
@@ -85,7 +85,7 @@ def make_file(filepath: str) -> None:
8585
8686
8787def test_redisai_invalid_rai_path (test_dir , monkeypatch ):
88- """An invalid RAI_PATH and valid SMARTSIM_DEP_INSTALL_PATH should fail"""
88+ """An invalid SMARTSIM_RAI_LIB and valid SMARTSIM_DEP_INSTALL_PATH should fail"""
8989
9090 rai_file_path = os .path .join (test_dir , "lib" , "mock-redisai.so" )
9191 make_file (os .path .join (test_dir , "lib" , "redisai.so" ))
@@ -94,15 +94,15 @@ def test_redisai_invalid_rai_path(test_dir, monkeypatch):
9494
9595 config = Config ()
9696
97- # Fail when no file exists @ RAI_PATH
97+ # Fail when no file exists @ SMARTSIM_RAI_LIB
9898 with pytest .raises (SSConfigError ) as ex :
9999 _ = config .redisai
100100
101101 assert "RedisAI dependency not found" in ex .value .args [0 ]
102102
103103
104104def test_redisai_valid_rai_path (test_dir , monkeypatch ):
105- """A valid RAI_PATH should override valid SMARTSIM_DEP_INSTALL_PATH and succeed"""
105+ """A valid SMARTSIM_RAI_LIB should override valid SMARTSIM_DEP_INSTALL_PATH and succeed"""
106106
107107 rai_file_path = os .path .join (test_dir , "lib" , "mock-redisai.so" )
108108 make_file (rai_file_path )
@@ -117,7 +117,7 @@ def test_redisai_valid_rai_path(test_dir, monkeypatch):
117117
118118
119119def test_redisai_invalid_lib_path (test_dir , monkeypatch ):
120- """Invalid RAI_PATH and invalid SMARTSIM_DEP_INSTALL_PATH should fail"""
120+ """Invalid SMARTSIM_RAI_LIB and invalid SMARTSIM_DEP_INSTALL_PATH should fail"""
121121
122122 rai_file_path = f"{ test_dir } /railib/redisai.so"
123123
@@ -133,7 +133,7 @@ def test_redisai_invalid_lib_path(test_dir, monkeypatch):
133133
134134
135135def test_redisai_valid_lib_path (test_dir , monkeypatch ):
136- """Valid RAI_PATH and invalid SMARTSIM_DEP_INSTALL_PATH should succeed"""
136+ """Valid SMARTSIM_RAI_LIB and invalid SMARTSIM_DEP_INSTALL_PATH should succeed"""
137137
138138 rai_file_path = os .path .join (test_dir , "lib" , "mock-redisai.so" )
139139 make_file (rai_file_path )
@@ -147,7 +147,7 @@ def test_redisai_valid_lib_path(test_dir, monkeypatch):
147147
148148
149149def test_redisai_valid_lib_path_null_rai (test_dir , monkeypatch ):
150- """Missing RAI_PATH and valid SMARTSIM_DEP_INSTALL_PATH should succeed"""
150+ """Missing SMARTSIM_RAI_LIB and valid SMARTSIM_DEP_INSTALL_PATH should succeed"""
151151
152152 rai_file_path : t .Optional [str ] = None
153153 lib_file_path = os .path .join (test_dir , "lib" , "redisai.so" )
@@ -166,35 +166,35 @@ def test_redis_conf():
166166 assert Path (config .database_conf ).is_file ()
167167 assert isinstance (config .database_conf , str )
168168
169- os .environ ["REDIS_CONF " ] = "not/a/path"
169+ os .environ ["SMARTSIM_REDIS_CONF " ] = "not/a/path"
170170 config = Config ()
171171 with pytest .raises (SSConfigError ):
172172 config .database_conf
173- os .environ .pop ("REDIS_CONF " )
173+ os .environ .pop ("SMARTSIM_REDIS_CONF " )
174174
175175
176176def test_redis_exe ():
177177 config = Config ()
178178 assert Path (config .database_exe ).is_file ()
179179 assert isinstance (config .database_exe , str )
180180
181- os .environ ["REDIS_PATH " ] = "not/a/path"
181+ os .environ ["SMARTSIM_REDIS_SERVER_EXE " ] = "not/a/path"
182182 config = Config ()
183183 with pytest .raises (SSConfigError ):
184184 config .database_exe
185- os .environ .pop ("REDIS_PATH " )
185+ os .environ .pop ("SMARTSIM_REDIS_SERVER_EXE " )
186186
187187
188188def test_redis_cli ():
189189 config = Config ()
190190 assert Path (config .redisai ).is_file ()
191191 assert isinstance (config .redisai , str )
192192
193- os .environ ["REDIS_CLI_PATH " ] = "not/a/path"
193+ os .environ ["SMARTSIM_REDIS_CLI_EXE " ] = "not/a/path"
194194 config = Config ()
195195 with pytest .raises (SSConfigError ):
196196 config .database_cli
197- os .environ .pop ("REDIS_CLI_PATH " )
197+ os .environ .pop ("SMARTSIM_REDIS_CLI_EXE " )
198198
199199
200200@pytest .mark .parametrize (
0 commit comments