def testFormatNonAsciiMarkerStringAllAscii(self):
     self.term_size_mock.return_value = (80, 80)
     args = ['command', '--foo', 'bar']
     with self.assertRaisesRegex(
             ValueError, r'The command line is composed entirely of ASCII '
             r'characters\.'):
         exceptions._FormatNonAsciiMarkerString(args)
 def testFormatNonAsciiMarkerStringReallySmallScreen(self):
     # 10 < len('^ invalid character')
     self.term_size_mock.return_value = (10, 80)
     args = ['command', '--foo', b'\xce\x94']
     marker_string = exceptions._FormatNonAsciiMarkerString(args)
     self.assertEqual(marker_string, ('command --foo \\u0394\n'
                                      '              ^ invalid character'))