From 9a2c2798ed9e151769889866f59776183cb03b00 Mon Sep 17 00:00:00 2001 From: Amber Sahdev Date: Thu, 20 Jun 2024 00:46:14 -0700 Subject: [PATCH] reformatting scrappy testing script --- tests/simple_test.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/simple_test.py b/tests/simple_test.py index f32c616..788933c 100644 --- a/tests/simple_test.py +++ b/tests/simple_test.py @@ -12,17 +12,21 @@ def main(): - # Says hi, waits 12 seconds, requests to open chrome app = App() - threading.Thread(target=put_requests_in_app, args=(app,), daemon=True).start() + threading.Thread(target=simple_test, args=(app,), daemon=True).start() app.run() - return -def put_requests_in_app(app): - app.ui.main_window.user_request_queue.put('hi there') +def simple_test(app): + # Says hi, waits 12 seconds, requests to open chrome + time.sleep(1) + put_requests_in_app(app, 'Hello') time.sleep(12) - app.ui.main_window.user_request_queue.put('open chrome') + put_requests_in_app(app, 'Open Chrome') + + +def put_requests_in_app(app, request): + app.ui.main_window.user_request_queue.put(request) if __name__ == '__main__':