diff options
author | Phillip Julien <pjulien93@gmail.com> | 2023-12-14 20:06:56 -0500 |
---|---|---|
committer | Adrian Sampson <adrian@radbox.org> | 2023-12-18 17:23:09 -0500 |
commit | a359cacf6db62e49d8a6619e6bc6ea2e37a4f18c (patch) | |
tree | 5e948970ed7b587f72036232f35ff0b7a5d74565 | |
parent | 41d51209199dd3a4b13714180f7d9c90948e1895 (diff) |
Fix failing test: test_nonexistant_dbtest-stdin-suppression
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.
-rw-r--r-- | test/test_ui.py | 3 |
1 files changed, 2 insertions, 1 deletions
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: |