def test_with_missing(): ''' return False if missing data present ''' with patch.object(RunSnpDetection, "__init__", lambda x: None): detect_obj = RunSnpDetection() tab = pandas.DataFrame({'A':[1,2,4, numpy.nan], 'B':[5,6,7,8], 'C':[9,10,11,12]}) assert detect_obj.all_data_filled(tab) == False
def test_missing(): ''' a full dataframe returns true ''' with patch.object(RunSnpDetection, "__init__", lambda x: None): detect_obj = RunSnpDetection() tab = pandas.DataFrame({'A':[1,2,3,4], 'B':[5,6,7,8], 'C':[9,10,11,12]}) assert detect_obj.all_data_filled(tab)