diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_nsjail.py | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py index d63180d..127753e 100644 --- a/tests/test_nsjail.py +++ b/tests/test_nsjail.py @@ -207,6 +207,14 @@ class NsJailTests(unittest.TestCase):          )          self.assertEqual(result.stderr, None) +    def test_file_write_error(self): +        """Test errors during file write.""" +        result = self.nsjail.python3([""], [FileAttachment("output", "hello")]) + +        self.assertEqual(result.returncode, None) +        self.assertEqual(result.stdout, "IsADirectoryError: Failed to create file 'output'.") +        self.assertEqual(result.stderr, None) +      def test_sigsegv_returns_139(self):  # In honour of Juan.          code = dedent(              """ | 
