File tree Expand file tree Collapse file tree 5 files changed +15
-15
lines changed
python/tests/async/env_vars Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ async def test_env_vars_on_sandbox(template):
13
13
finally :
14
14
await sandbox .kill ()
15
15
16
- async def test_env_vars_per_execution (sandbox : AsyncSandbox ):
17
- result = await sandbox .run_code (
16
+ async def test_env_vars_per_execution (async_sandbox : AsyncSandbox ):
17
+ result = await async_sandbox .run_code (
18
18
"echo $FOO" ,
19
19
envs = {"FOO" : "bar" },
20
20
language = "bash"
21
21
)
22
22
23
- result_empty = await sandbox .run_code (
23
+ result_empty = await async_sandbox .run_code (
24
24
"echo ${FOO:-default}" ,
25
25
language = "bash"
26
26
)
Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ async def test_env_vars_on_sandbox(template):
14
14
finally :
15
15
await sandbox .kill ()
16
16
17
- async def test_env_vars_per_execution (sandbox : AsyncSandbox ):
18
- result = await sandbox .run_code (
17
+ async def test_env_vars_per_execution (async_sandbox : AsyncSandbox ):
18
+ result = await async_sandbox .run_code (
19
19
'System.getProperty("FOO")' ,
20
20
envs = {"FOO" : "bar" },
21
21
language = "java"
22
22
)
23
23
24
- result_empty = await sandbox .run_code (
24
+ result_empty = await async_sandbox .run_code (
25
25
'System.getProperty("FOO", "default")' ,
26
26
language = "java"
27
27
)
Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ async def test_env_vars_on_sandbox(template):
14
14
finally :
15
15
await sandbox .kill ()
16
16
17
- async def test_env_vars_per_execution (sandbox : AsyncSandbox ):
18
- result = await sandbox .run_code (
17
+ async def test_env_vars_per_execution (async_sandbox : AsyncSandbox ):
18
+ result = await async_sandbox .run_code (
19
19
"process.env.FOO" ,
20
20
envs = {"FOO" : "bar" },
21
21
language = "javascript"
22
22
)
23
23
24
- result_empty = await sandbox .run_code (
24
+ result_empty = await async_sandbox .run_code (
25
25
"process.env.FOO || 'default'" ,
26
26
language = "javascript"
27
27
)
Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ async def test_env_vars_on_sandbox(template):
14
14
finally :
15
15
await sandbox .kill ()
16
16
17
- async def test_env_vars_per_execution (sandbox : AsyncSandbox ):
18
- result = await sandbox .run_code (
17
+ async def test_env_vars_per_execution (async_sandbox : AsyncSandbox ):
18
+ result = await async_sandbox .run_code (
19
19
"import os; os.getenv('FOO')" ,
20
20
envs = {"FOO" : "bar" },
21
21
language = "python"
22
22
)
23
23
24
- result_empty = await sandbox .run_code (
24
+ result_empty = await async_sandbox .run_code (
25
25
"import os; os.getenv('FOO', 'default')" ,
26
26
language = "python"
27
27
)
Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ async def test_env_vars_on_sandbox(template):
14
14
finally :
15
15
await sandbox .kill ()
16
16
17
- async def test_env_vars_per_execution (sandbox : AsyncSandbox ):
18
- result = await sandbox .run_code (
17
+ async def test_env_vars_per_execution (async_sandbox : AsyncSandbox ):
18
+ result = await async_sandbox .run_code (
19
19
'Sys.getenv("FOO")' ,
20
20
envs = {"FOO" : "bar" },
21
21
language = "r"
22
22
)
23
23
24
- result_empty = await sandbox .run_code (
24
+ result_empty = await async_sandbox .run_code (
25
25
'Sys.getenv("FOO", unset = "default")' ,
26
26
language = "r"
27
27
)
You can’t perform that action at this time.
0 commit comments