def test_query_no_def_no(self): """Test question function with I/O.""" self.assertEqual( query_yes_no(question="Is anyone wiser than Socrates?", default="no"), False)
def test_query_no_def_invalid(self): """Test question function with I/O.""" with self.assertRaises(ValueError) as context: query_yes_no(question="Is anyone wiser than Socrates?", default="xxx")
def test_query_yes(self): """Test question function with I/O.""" self.assertEqual( query_yes_no(question="Is anyone wiser than Socrates?"), True)