Spaces:
Sleeping
Sleeping
Download tests/test_date_parser.py from fti-opportunity-tracker/app: direct link, hf CLI and curl.
- Browser
- Download file 546 Bytes
-
https://huggingface.co/spaces/fti-opportunity-tracker/app/resolve/main/tests/test_date_parser.py
- Command line
-
hf download hf://spaces/fti-opportunity-tracker/app/tests/test_date_parser.py
-
curl -L -o test_date_parser.py https://huggingface.co/spaces/fti-opportunity-tracker/app/resolve/main/tests/test_date_parser.py
546 Bytes
| from datetime import date | |
| from opportunity_tracker.date_parser import extract_closing_date, extract_dates, extract_publish_date | |
| def test_extracts_dayfirst_dates() -> None: | |
| assert extract_dates("Closing: 15/06/2026") == [date(2026, 6, 15)] | |
| def test_extracts_labeled_closing_date() -> None: | |
| assert extract_closing_date("Tender ABC closing date: 31 May 2026") == date(2026, 5, 31) | |
| def test_extracts_arabic_digit_publish_date() -> None: | |
| assert extract_publish_date("تاريخ النشر: ٠٦/٠٥/٢٠٢٦") == date(2026, 5, 6) | |