示例#1
0
 def testArgparseBool_InvalidValue(self):
     expected_error = "Invalid value encountered. Expected 'True' or 'False'."
     with self.assertRaisesWithLiteralMatch(argparse.ArgumentTypeError,
                                            expected_error):
         config_updater_util.ArgparseBool("baz")
示例#2
0
 def testArgparseBool_InvalidType(self):
     expected_error = "Unexpected type: float. Expected a string."
     with self.assertRaisesWithLiteralMatch(argparse.ArgumentTypeError,
                                            expected_error):
         config_updater_util.ArgparseBool(1.23)