test_default_arguments: Adjust for Python 3.10.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
							parent
							
								
									34f5c4ef02
								
							
						
					
					
						commit
						ffb8a38f26
					
				
					 1 changed files with 5 additions and 6 deletions
				
			
		|  | @ -19,17 +19,16 @@ class TestDefaultArguments(TestCase): | ||||||
|                 parser.parse_args(["invalid argument"]) |                 parser.parse_args(["invalid argument"]) | ||||||
|         self.assertEqual(cm.exception.code, 2) |         self.assertEqual(cm.exception.code, 2) | ||||||
|         # Assert that invalid arguments exit with printing the full usage (non-standard behavior) |         # Assert that invalid arguments exit with printing the full usage (non-standard behavior) | ||||||
|         self.assertTrue( |         self.assertRegex( | ||||||
|             mock_stderr.getvalue().startswith( |             mock_stderr.getvalue(), | ||||||
|                 """usage: lorem ipsum |             r"""^usage: lorem ipsum | ||||||
| 
 | 
 | ||||||
| optional arguments: | (optional arguments|options): | ||||||
|   -h, --help            show this help message and exit |   -h, --help            show this help message and exit | ||||||
| 
 | 
 | ||||||
| Zulip API configuration: | Zulip API configuration: | ||||||
|   --site ZULIP_SITE     Zulip server URI |   --site ZULIP_SITE     Zulip server URI | ||||||
| """ | """, | ||||||
|             ) |  | ||||||
|         ) |         ) | ||||||
| 
 | 
 | ||||||
|     @patch("os.path.exists", return_value=False) |     @patch("os.path.exists", return_value=False) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Anders Kaseorg
						Anders Kaseorg