diff options
Diffstat (limited to 'yaksh/evaluator_tests/test_scilab_evaluation.py')
-rw-r--r-- | yaksh/evaluator_tests/test_scilab_evaluation.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/yaksh/evaluator_tests/test_scilab_evaluation.py b/yaksh/evaluator_tests/test_scilab_evaluation.py index 5a452a3..c3a1c83 100644 --- a/yaksh/evaluator_tests/test_scilab_evaluation.py +++ b/yaksh/evaluator_tests/test_scilab_evaluation.py @@ -3,13 +3,15 @@ import unittest import os import shutil import tempfile +from psutil import Process from textwrap import dedent + +#Local Import from yaksh import grader as gd from yaksh.grader import Grader from yaksh.scilab_code_evaluator import ScilabCodeEvaluator from yaksh.evaluator_tests.test_python_evaluation import EvaluatorBaseTest - class ScilabEvaluationTestCases(EvaluatorBaseTest): def setUp(self): tmp_in_dir_path = tempfile.mkdtemp() @@ -136,6 +138,11 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest): self.assertFalse(result.get("success")) self.assert_correct_output(self.timeout_msg, result.get("error")) + parent_proc = Process(os.getpid()).children() + if parent_proc: + children_procs = Process(parent_proc[0].pid) + self.assertFalse(any(children_procs.children(recursive=True))) + if __name__ == '__main__': unittest.main() |