diff options
author | 2021-02-04 19:08:58 -0800 | |
---|---|---|
committer | 2021-02-04 19:30:42 -0800 | |
commit | a1b5e5bdc0652eda66bf550ab0423f000918645a (patch) | |
tree | 73f11c0aa06301827cca1a531978393331de2975 | |
parent | Close file descriptors when subprocess ends (diff) |
Fix the memory limit test and the import error
-rw-r--r-- | tests/test_nsjail.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py index 820f57e..06dc5b6 100644 --- a/tests/test_nsjail.py +++ b/tests/test_nsjail.py @@ -5,7 +5,7 @@ import unittest import unittest.mock from textwrap import dedent -from snekbox.nsjail import MEM_MAX, NsJail, OUTPUT_MAX, READ_CHUNK_SIZE +from snekbox.nsjail import NsJail, OUTPUT_MAX, READ_CHUNK_SIZE class NsJailTests(unittest.TestCase): @@ -40,7 +40,7 @@ class NsJailTests(unittest.TestCase): def test_memory_returns_137(self): # Add a kilobyte just to be safe. code = dedent(f""" - x = ' ' * {MEM_MAX + 1000} + x = ' ' * {self.nsjail.config.cgroup_mem_max + 1000} """).strip() result = self.nsjail.python3(code) |