mirror of
https://github.com/fenago/data-science.git
synced 2026-05-05 00:51:50 +00:00
24 lines
727 B
Python
24 lines
727 B
Python
import unittest
|
|
import import_ipynb
|
|
import pandas as pd
|
|
import pandas.testing as pd_testing
|
|
|
|
class Test(unittest.TestCase):
|
|
def setUp(self):
|
|
import Chapter_14_Exercise_14_06_Factor_Analysis_v1
|
|
self.exercises = Chapter_14_Exercise_14_06_Factor_Analysis_v1
|
|
self.filename = '../Dataset/ad.data'
|
|
self.adData = pd.read_csv(self.filename,sep=",",header = None,error_bad_lines=False)
|
|
self.dataShape = self.adData.shape
|
|
|
|
def test_file_url(self):
|
|
self.assertEqual(self.exercises.filename, self.filename)
|
|
|
|
|
|
def test_shape(self):
|
|
self.assertEqual(self.exercises.adData.shape, self.dataShape)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|