Skip to content

Commit

Permalink
reformatting scrappy testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
AmberSahdev committed Jun 20, 2024
1 parent a787620 commit 9a2c279
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests/simple_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__':
Expand Down

0 comments on commit 9a2c279

Please sign in to comment.