Spaces:
Runtime error
Runtime error
Download tests/test_data_creation.py from alexray/btc_predictor: direct link, hf CLI and curl.
- Browser
- Download file 650 Bytes
-
https://huggingface.co/spaces/alexray/btc_predictor/resolve/main/tests/test_data_creation.py
- Command line
-
hf download hf://spaces/alexray/btc_predictor/tests/test_data_creation.py
-
curl -L -o test_data_creation.py https://huggingface.co/spaces/alexray/btc_predictor/resolve/main/tests/test_data_creation.py
650 Bytes
| import unittest | |
| from data_creation import create_data | |
| class TestDataCreation(unittest.TestCase): | |
| def test_process_data(self): | |
| result_df = create_data() | |
| self.assertFalse(result_df.empty) | |
| expected_columns = ['open', 'high', 'low', 'close', 'volume', | |
| 'target', '000001.SS', 'AAPL', 'CL=F', | |
| 'GC=F', 'HG=F', 'NVDA', '^DJI', '^GSPC', | |
| '^N100', '^N225'] | |
| for col in expected_columns: | |
| self.assertIn(col, result_df.columns) | |
| self.assertGreater(len(result_df), 3000) | |
| if __name__ == '__main__': | |
| unittest.main() | |