Spaces:
Sleeping
Sleeping
Download tests/test_datasets.py from jaothan/GenAI_project: direct link, hf CLI and curl.
- Browser
- Download file 476 Bytes
-
https://huggingface.co/spaces/jaothan/GenAI_project/resolve/main/tests/test_datasets.py
- Command line
-
hf download hf://spaces/jaothan/GenAI_project/tests/test_datasets.py
-
curl -L -o test_datasets.py https://huggingface.co/spaces/jaothan/GenAI_project/resolve/main/tests/test_datasets.py
476 Bytes
| import unittest | |
| from data.datasets import load_dataset, preprocess_data | |
| class TestDatasets(unittest.TestCase): | |
| def test_load_dataset(self): | |
| df = load_dataset('data/test.csv') | |
| self.assertIsNotNone(df) | |
| def test_preprocess_data(self): | |
| df = load_dataset('data/test.csv') | |
| preprocessed_df = preprocess_data(df) | |
| self.assertFalse(preprocessed_df.isnull().values.any()) | |
| if __name__ == '__main__': | |
| unittest.main() | |