From 7a29a2911afef86ae6bddee5439ec56e1ae25185 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 11 May 2023 17:34:35 -0700 Subject: [PATCH] aider: Added assertion to confirm that foo.txt exists after main exits in test_main_with_empty_dir_new_file. # Context: USER: in test_main_with_empty_dir_new_file, confirm that foo.txt exists after main exists ASSISTANT: To confirm that `foo.txt` exists after `main` exits, you can add an assertion in the `test_main_with_empty_dir_new_file` test case. Here's the change: ```python tests/test_main.py <<<<<<< ORIGINAL main(['foo.txt']) sys.stdin = save_stdin ======= main(['foo.txt']) sys.stdin = save_stdin self.assertTrue(os.path.exists('foo.txt')) >>>>>>> UPDATED ``` --- tests/test_main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_main.py b/tests/test_main.py index e699d3684..99688a036 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -22,3 +22,4 @@ class TestMain(TestCase): sys.stdin = dev_null main(['foo.txt']) sys.stdin = save_stdin + self.assertTrue(os.path.exists('foo.txt'))