From a359cacf6db62e49d8a6619e6bc6ea2e37a4f18c Mon Sep 17 00:00:00 2001 From: Phillip Julien Date: Thu, 14 Dec 2023 20:06:56 -0500 Subject: Fix failing test: test_nonexistant_db Resolves #5027: failing test: test_nonexistant_db This test was failing because it was requesting input from the user on stdin. This diff mocks stdin with a canned response. --- test/test_ui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_ui.py b/test/test_ui.py index cae861480..a3f92b12e 100644 --- a/test/test_ui.py +++ b/test/test_ui.py @@ -937,7 +937,8 @@ class ConfigTest(unittest.TestCase, TestHelper, _common.Assertions): config.write("library: /xxx/yyy/not/a/real/path") with self.assertRaises(ui.UserError): - self.run_command("test", lib=None) + with control_stdin("n"): + self.run_command("test", lib=None) def test_user_config_file(self): with self.write_config_file() as file: -- cgit v1.2.3