Spaces:
Sleeping
Sleeping
Download test_process_entry_occurrences.py from gui-sparim/ESJL: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/spaces/gui-sparim/ESJL/resolve/main/test_process_entry_occurrences.py
- Command line
-
hf download hf://spaces/gui-sparim/ESJL/test_process_entry_occurrences.py
-
curl -L -o test_process_entry_occurrences.py https://huggingface.co/spaces/gui-sparim/ESJL/resolve/main/test_process_entry_occurrences.py
1.06 kB
| import unittest | |
| from pathlib import Path | |
| class ProcessEntryOccurrencesTest(unittest.TestCase): | |
| def test_process_occurrence_combines_process_and_entry_date(self): | |
| source = Path("app.js").read_text(encoding="utf-8") | |
| self.assertIn("function processOccurrenceGroupKey(row)", source) | |
| self.assertIn("normalizedProcessKey(processKey(row))", source) | |
| self.assertIn("rowEntryOccurrenceKey(row)", source) | |
| self.assertLess( | |
| source.index('row.fields?.["Entrada Equipe"]', source.index("function rowEntryOccurrenceKey")), | |
| source.index('row.fields?.["Entrada EAV"]', source.index("function rowEntryOccurrenceKey")), | |
| ) | |
| def test_sheet_groups_and_metrics_use_occurrences(self): | |
| source = Path("app.js").read_text(encoding="utf-8") | |
| self.assertIn("const inscriptionsByOccurrence = new Map();", source) | |
| self.assertIn("processes: inscriptionsByOccurrence.size", source) | |
| self.assertIn("data-process-occurrence-key=", source) | |
| if __name__ == "__main__": | |
| unittest.main() | |