diff options
author | 2021-12-21 09:31:50 -0800 | |
---|---|---|
committer | 2021-12-21 09:31:50 -0800 | |
commit | e7019bf300b0c5eca64d6c4ebabe52c88f1d0375 (patch) | |
tree | 8261f3b308c652b1575a70baea34acfc120bc8f8 /tests/test_nsjail.py | |
parent | Set the max swap size through NsJail (diff) |
Fix NsJail args test
Dynamically calculate the position of the arguments rather than
hard-coding them.
Diffstat (limited to 'tests/test_nsjail.py')
-rw-r--r-- | tests/test_nsjail.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py index c0ed96b..989cc31 100644 --- a/tests/test_nsjail.py +++ b/tests/test_nsjail.py @@ -259,7 +259,8 @@ class NsJailTests(unittest.TestCase): args = ("foo", "bar") result = self.nsjail.python3("", nsjail_args=args) - self.assertEqual(result.args[9:11], args) + end = result.args.index("--") + self.assertEqual(result.args[end - len(args):end], args) def test_py_args(self): args = ("-m", "timeit") |