Download tests/test_process_data.py from regulatorystudies/cra-window-rules: direct link, hf CLI and curl.
- Browser
- Download file 501 Bytes
-
https://huggingface.co/spaces/regulatorystudies/cra-window-rules/resolve/main/tests/test_process_data.py
- Command line
-
hf download hf://spaces/regulatorystudies/cra-window-rules/tests/test_process_data.py
-
curl -L -o test_process_data.py https://huggingface.co/spaces/regulatorystudies/cra-window-rules/resolve/main/tests/test_process_data.py
501 Bytes
| #import pytest | |
| from fr_toolbelt.api_requests import get_documents_by_date | |
| from pandas import DataFrame | |
| from modules.get_rules_in_window import ( | |
| format_documents, | |
| ) | |
| START = "2024-03-01" | |
| END = "2024-04-30" | |
| #@pytest.fixture | |
| def temp_documents(): | |
| return get_documents_by_date(START, end_date=END, document_types=("RULE", ))[0] | |
| TEMP_DOCUMENTS = temp_documents() | |
| def test_format_documents(): | |
| formatted = format_documents(TEMP_DOCUMENTS) | |
| assert isinstance(formatted, DataFrame) | |