コード例 #1
0
 def test_input_combos_multiple_repeats(self):
     """Test getting input combos for more than one repeats."""
     self.assertEqual(list(TruthTable.input_combos(2)), [(
         False,
         False,
     ), (
         False,
         True,
     ), (
         True,
         False,
     ), (
         True,
         True,
     )])
コード例 #2
0
 def test_input_combos_one_repeat(self):
     """Test getting input combos for 1 repeat."""
     self.assertEqual(list(TruthTable.input_combos(1)), [(False, ),
                                                         (True, )])
コード例 #3
0
 def test_input_combos_empty(self):
     """Test getting an empty set of input_combos."""
     self.assertEqual(list(TruthTable.input_combos(0)), [()])