aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_nsjail.py
diff options
context:
space:
mode:
authorGravatar Mark <[email protected]>2023-08-19 16:10:59 -0700
committerGravatar Mark <[email protected]>2023-08-19 20:42:56 -0700
commit0db60fc25bb48d2c139b91e78b7bcfe7b98475b4 (patch)
treec7be500ffe0ca2a8acbd603395cb13fe331d39f2 /tests/test_nsjail.py
parentUse buildpack-deps as the builder base image (diff)
Install multiple Python versions in image
Separate snekbox's Python interpreter from the interpreter used by NsJail. This allows for the interpreters to be updated on different cadences and provides better isolation of packages. Each Python interpreter adds about 70 MB to the built image.
Diffstat (limited to 'tests/test_nsjail.py')
-rw-r--r--tests/test_nsjail.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py
index c701d3a..25c8354 100644
--- a/tests/test_nsjail.py
+++ b/tests/test_nsjail.py
@@ -79,7 +79,7 @@ class NsJailTests(unittest.TestCase):
for _ in range({max_pids}):
print(subprocess.Popen(
[
- '/usr/local/bin/python3',
+ '/lang/python/default/bin/python',
'-c',
'import time; time.sleep(1)'
],
@@ -431,7 +431,7 @@ class NsJailTests(unittest.TestCase):
for args, expected in cases:
with self.subTest(args=args):
result = self.nsjail.python3(py_args=args)
- idx = result.args.index("-BSqu")
+ idx = result.args.index(self.nsjail.config.exec_bin.path)
self.assertEqual(result.args[idx + 1 :], expected)
self.assertEqual(result.returncode, 0)