diff options
author | 2022-11-24 10:32:32 +0800 | |
---|---|---|
committer | 2022-11-24 10:32:32 +0800 | |
commit | 78b4b6af18a40db3162aad56eb726a26c5a74e8c (patch) | |
tree | 409018c39136b481249623663b8672f9ded3719d /tests/test_integration.py | |
parent | Refactor subprocess mount to ctypes call (diff) |
Refactor output files in `output` dir
Diffstat (limited to 'tests/test_integration.py')
-rw-r--r-- | tests/test_integration.py | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/test_integration.py b/tests/test_integration.py index 086abab..ba0d9b5 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -62,11 +62,15 @@ class IntegrationTests(unittest.TestCase): "path": "main.py", "content": b64encode_code( """ + from pathlib import Path from mod import lib print(lib.var) - with open('output.txt', 'w') as f: - f.write('file write test') + with open('output/test.txt', 'w') as f: + f.write('test 1') + + Path('output/dir').mkdir() + Path('output/dir/test2.txt').write_text('test 2') """ ), }, @@ -80,10 +84,15 @@ class IntegrationTests(unittest.TestCase): "returncode": 0, "files": [ { - "path": "output.txt", - "size": len("file write test"), - "content": b64encode_code("file write test"), - } + "path": "dir/test2.txt", + "size": len("test 2"), + "content": b64encode_code("test 2"), + }, + { + "path": "test.txt", + "size": len("test 1"), + "content": b64encode_code("test 1"), + }, ], } |