Esempio n. 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")
Esempio n. 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)