class Test(TestCase): ''' This Test class has three test cases which are built to test the different functions of DataManager() Class ''' def setUp(self): self.datamanager = DataManager() def test_Initialization(self): ''' Loading function is already called during the object creation of DataManager() class ''' data = self.datamanager.raw_data self.assertNotEqual(len(data.index),0) def test_cleaning_function(self): ''' Cleaning function is already called during the instance creation of DataManager Class ''' columnNames = ['dimension','definition','caption','licensedContent','description'] for colname in columnNames: self.assertEqual(self.datamanager.cleaned_data[colname].isnull().sum(),0) def test_binaryTree_function(self): TreeToCompare = DecisionTreeClassifier(criterion="entropy",min_samples_split= 2 ,min_samples_leaf= 128 ) binaryTree = self.datamanager.binaryTree(self.datamanager.cleaned_data) self.assertEqual(type(TreeToCompare),type(binaryTree))
class Test(TestCase): ''' This Test class has three test cases which are built to test the different functions of DataPlotter() Class ''' def setUp(self): self.datamanager=DataManager() def test_plotFeatureImportance(self): clf = self.datamanager.binaryTree(self.datamanager.cleaned_data) val = dataplotter.plotFeatureImportance(self.datamanager.cleaned_data,clf) self.assertTrue(val) def test_plotNumericalCorrelationMatrix(self): val = dataplotter.plotNumericalCorrelationMatrix(self.datamanager.cleaned_data) self.assertTrue(val) def test_plotGraphicalCorrelationMatrix(self): val = dataplotter.plotGraphicalCorrelationMatrix(self.datamanager.cleaned_data) self.assertTrue(val)
def setUp(self): self.dataexplorer = DataExplorer() self.datamanager = DataManager()
def setUp(self): self.video = Video('Title', 'Description') self.datamanager = DataManager()
def setUp(self): self.datamanager = DataManager()
def setUp(self): self.datamanager=DataManager()