aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_nsjail.py
diff options
context:
space:
mode:
authorGravatar Mark <[email protected]>2023-09-16 10:53:50 -0700
committerGravatar GitHub <[email protected]>2023-09-16 10:53:50 -0700
commitbc708513c5c76439349d2afe8829c9e48a30b157 (patch)
treedf9d1a33b2ae872ef46ee9933ffc0ca420077019 /tests/test_nsjail.py
parentMerge pull request #192 from python-discord/bump-Python-versions (diff)
parentUse lower timeout for file parsing timeout test (diff)
Merge #193 - Update to Debian Bookworm
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 fe55290..5d927c2 100644
--- a/tests/test_nsjail.py
+++ b/tests/test_nsjail.py
@@ -233,7 +233,7 @@ class NsJailTests(unittest.TestCase):
size = 32 * 1024 * 1024
with open("file", "w") as f:
- for _ in range((size // 1024) - 5):
+ for _ in range(size // 1024):
f.write(data)
for i in range(100):
@@ -242,7 +242,7 @@ class NsJailTests(unittest.TestCase):
).strip()
# A value higher than the actual memory needed is used to avoid the limit
# on total file size being reached before the timeout when reading.
- nsjail = NsJail(memfs_instance_size=512 * Size.MiB, files_timeout=1)
+ nsjail = NsJail(memfs_instance_size=128 * Size.MiB, files_timeout=0.1)
result = nsjail.python3(["-c", code])
self.assertEqual(result.returncode, None)
self.assertEqual(