Logo Search packages:      
Sourcecode: quickly-widgets version File versions  Download package

def widgets::tests::test_dictionary_grid::TestDictionaryGrid::test_infer_boolean_values (   self  ) 

Ensure that inferring boolean values from strings works

Definition at line 177 of file test_dictionary_grid.py.

00177                                        :
        """Ensure that inferring boolean values from strings works"""
        keys = ["a?","b?","c?","d?","e?","f?"]
        dicts = [{"a?":True,"b?":False,"c?":"Yes","d?":"No","e?":1.5,"f?":0}]
        grid = DictionaryGrid(dicts, keys)
        test_dict = grid.get_dictionaries_copy()[0]
        self.assertEqual(test_dict["a?"],True)
        self.assertEqual(test_dict["b?"],False)
        self.assertEqual(test_dict["c?"],True)
        self.assertEqual(test_dict["d?"],False)
        self.assertEqual(test_dict["e?"],True)
        self.assertEqual(test_dict["f?"],False)
        

    def test_mismatched_col_and_val_types(self):


Generated by  Doxygen 1.6.0   Back to index