Beispiel #1
0
 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)
Beispiel #2
0
 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")
Beispiel #3
0
 def test_query_yes(self):
     """Test question function with I/O."""
     self.assertEqual(
         query_yes_no(question="Is anyone wiser than Socrates?"), True)