aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-12-28 21:49:33 -0800
committerGravatar MarkKoz <[email protected]>2019-12-28 21:49:33 -0800
commitda8a1752dde8d8a8afb1a4f64d7678f80e802dab (patch)
tree91f4e006a6451e6da763ee7deecddf6c490a37c0
parentTest root and direct children are read-only (diff)
Add test for importing numpy
This is a test for #53, which fixed numpy failing to import due to using multiple threads by default.
-rw-r--r--tests/test_nsjail.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py
index e439c15..f04d317 100644
--- a/tests/test_nsjail.py
+++ b/tests/test_nsjail.py
@@ -152,3 +152,9 @@ class NsJailTests(unittest.TestCase):
self.assertEqual(result.returncode, 1)
self.assertIn("Function not implemented", result.stdout)
self.assertEqual(result.stderr, None)
+
+ def test_numpy_import(self):
+ result = self.nsjail.python3("import numpy")
+ self.assertEqual(result.returncode, 0)
+ self.assertEqual(result.stdout, "")
+ self.assertEqual(result.stderr, None)