@@ -180,13 +180,16 @@ def test_native_executable_venv_and_one_file():
180
180
f .write ("from termcolor import colored, cprint\n " )
181
181
f .write ("colored_text = colored('hello standalone world', 'red', attrs=['reverse', 'blink'])\n " )
182
182
f .write ("print(colored_text)\n " )
183
+ f .write ("import ujson\n " )
184
+ f .write ('d = ujson.loads("""{"key": "value"}""")\n ' )
185
+ f .write ("print('key=' + d['key'])\n " )
183
186
184
187
venv_dir = os .path .join (target_dir , "venv" )
185
188
cmd = [graalpy , "-m" , "venv" , venv_dir ]
186
189
out = run_cmd (cmd , env )
187
190
188
191
venv_python = os .path .join (venv_dir , "Scripts" , "python.cmd" ) if os .name == "nt" else os .path .join (venv_dir , "bin" , "python" )
189
- cmd = [venv_python , "-m" , "pip" , "--no-cache-dir" , "install" , "termcolor" ]
192
+ cmd = [venv_python , "-m" , "pip" , "--no-cache-dir" , "install" , "termcolor" , "ujson" ]
190
193
out = run_cmd (cmd , env )
191
194
192
195
target_file = os .path .join (target_dir , "hello" )
@@ -198,6 +201,7 @@ def test_native_executable_venv_and_one_file():
198
201
out = run_cmd (cmd , env )
199
202
200
203
assert "hello standalone world" in out
204
+ assert "key=value" in out
201
205
202
206
@unittest .skipUnless (is_enabled , "ENABLE_STANDALONE_UNITTESTS is not true" )
203
207
def test_native_executable_module ():
0 commit comments