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