diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_integration.py | 6 | ||||
-rw-r--r-- | tests/test_nsjail.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_integration.py b/tests/test_integration.py index 01fa657..91b01e6 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -79,11 +79,11 @@ class IntegrationTests(unittest.TestCase): from mod import lib print(lib.var) - with open('output/test.txt', 'w') as f: + with open('test.txt', 'w') as f: f.write('test 1') - Path('output/dir').mkdir() - Path('output/dir/test2.txt').write_text('test 2') + Path('dir').mkdir() + Path('dir/test2.txt').write_text('test 2') """ ), }, diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py index 71405c7..138c68a 100644 --- a/tests/test_nsjail.py +++ b/tests/test_nsjail.py @@ -191,12 +191,12 @@ class NsJailTests(unittest.TestCase): data = "a" * 1024 size = 32 * 1024 * 1024 - with open("output/file", "w") as f: + with open("file", "w") as f: for _ in range((size // 1024) - 5): f.write(data) for i in range(100): - os.symlink("file", f"output/file{i}") + os.symlink("file", f"file{i}") """ ).strip() @@ -210,7 +210,7 @@ class NsJailTests(unittest.TestCase): def test_file_write_error(self): """Test errors during file write.""" - result = self.nsjail.python3([""], [FileAttachment("output", "hello".encode())]) + result = self.nsjail.python3([""], [FileAttachment("../dev", "hello".encode())]) self.assertEqual(result.returncode, None) self.assertEqual(result.stdout, "IsADirectoryError: Failed to create file 'output'.") |