mirror of
https://github.com/fenago/data-science.git
synced 2026-05-04 00:22:32 +00:00
25 lines
576 B
Python
25 lines
576 B
Python
import unittest
|
|
import import_ipynb
|
|
import pandas as pd
|
|
import pandas.testing as pd_testing
|
|
import numpy.testing as np_testing
|
|
from sklearn.cluster import KMeans
|
|
|
|
class Test(unittest.TestCase):
|
|
def setUp(self):
|
|
import Exercise10_04
|
|
self.exercises = Exercise10_04
|
|
|
|
self.file_url = '../dataset/ames_iowa_housing.csv'
|
|
self.df = pd.read_csv(self.file_url)
|
|
|
|
|
|
def test_file_url(self):
|
|
self.assertEqual(self.exercises.file_url, self.file_url)
|
|
|
|
def test_df(self):
|
|
pd_testing.assert_frame_equal(self.exercises.df, self.df)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|