aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christopher Baklid <[email protected]>2018-07-05 18:08:41 +0200
committerGravatar Christopher Baklid <[email protected]>2018-07-05 18:08:41 +0200
commit2de2c1f32c0df34356545fe04ca6406337ddedc3 (patch)
tree52c7d738666fc370c8027e3e9956d94e238df4d3
parentI should have made an MR for this (diff)
missing comma
-rw-r--r--snekbox.py2
-rw-r--r--tests/test_snekbox.py13
2 files changed, 8 insertions, 7 deletions
diff --git a/snekbox.py b/snekbox.py
index 95ff7e0..2d3fc66 100644
--- a/snekbox.py
+++ b/snekbox.py
@@ -42,7 +42,7 @@ class Snekbox(object):
'--disable_proc',
'--iface_no_lo',
'--cgroup_pids_max=1',
- '--cgroup_mem_max=52428800'
+ '--cgroup_mem_max=52428800',
'--quiet', '--',
self.python_binary, '-ISq', '-c', cmd]
diff --git a/tests/test_snekbox.py b/tests/test_snekbox.py
index a9d99a1..c95cf75 100644
--- a/tests/test_snekbox.py
+++ b/tests/test_snekbox.py
@@ -16,12 +16,13 @@ class SnekTests(unittest.TestCase):
result = snek.python3('print("test")')
self.assertEquals(result.strip(), 'test')
- # def test_memory_error(self):
- # code = ('x = "*"\n'
- # 'while True:\n'
- # ' x = x * 99\n')
- # result = snek.python3(code)
- # self.assertEquals(result.strip(), 'timed out or memory limit exceeded')
+ def test_memory_error(self):
+ code = ('x = "*"\n'
+ 'while True:\n'
+ ' x = x * 99\n')
+ result = snek.python3(code)
+
+ self.assertEquals(result.strip(), 'timed out or memory limit exceeded')
def test_timeout(self):
code = ('x = "*"\n'