From c4a884a9a7ea36d153810a35a1adebd79c3bd669 Mon Sep 17 00:00:00 2001 From: Freddy Boulton Date: Thu, 11 May 2023 11:53:45 -0400 Subject: [PATCH] Fix flaky interface test (#4168) * Fix test * Lint * Fix vs code lint --- .vscode/settings.json | 5 ++++- test/test_interfaces.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c3d9720eee4f0..474f46da915f9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,5 +12,8 @@ "cssvar.extensions": ["js", "css", "html", "jsx", "tsx", "svelte"], "python.analysis.extraPaths": ["./gradio/themes/utils"], "prettier.configPath": ".config/.prettierrc.json", - "prettier.ignorePath": ".config/.prettierignore" + "prettier.ignorePath": ".config/.prettierignore", + "python.testing.pytestArgs": ["."], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true } diff --git a/test/test_interfaces.py b/test/test_interfaces.py index 00bed720dd90d..ade45d9dcf21e 100644 --- a/test/test_interfaces.py +++ b/test/test_interfaces.py @@ -95,7 +95,7 @@ def test_block_thread(self, mock_sleep): interface.launch(prevent_thread_lock=False) output = out.getvalue().strip() assert ( - output == "Keyboard interruption in main thread... closing server." + "Keyboard interruption in main thread... closing server." in output ) @mock.patch("gradio.utils.colab_check")