| 38 | self.assertIs(_strip_optional(int), int) |
| 39 | |
| 40 | def test_union_without_none_unchanged(self) -> None: |
| 41 | anno = Union[int, str] |
| 42 | self.assertEqual(_strip_optional(anno), anno) |
| 43 | |
| 44 | |
| 45 | def _news_window() -> NewsWindow: |
| 46 | """A minimal valid collection window for resolver fixtures.""" |
| 47 | return NewsWindow( |
| 48 | source="pr-newswire", |
| 49 | start=datetime(2026, 1, 1, tzinfo=timezone.utc), |
| 50 | end=datetime(2026, 1, 2, tzinfo=timezone.utc), |
| 51 | ) |
| 52 | |
| 53 | |
| 54 | class IntrospectFlowSignatureTests(unittest.TestCase): |
| 55 | def test_collect_news_returns_window_input_and_cfg(self) -> None: |
| 56 | input_type, cfg_type = _introspect_flow_signature(collect_news) |
| 57 | self.assertIs(cfg_type, NewsCollectionCfg) |
| 58 | self.assertIs(input_type, NewsWindow) |
| 59 | |
| 60 | def test_resolves_postponed_annotations(self) -> None: |
| 61 | async def postponed_flow( |
| 62 | input: "ArxivIdentifier", |
| 63 | *, |
| 64 | cfg: "PaperSemanticCfg | None" = None, |
| 65 | ) -> None: |
| 66 | return None |
| 67 | |
| 68 | input_type, cfg_type = _introspect_flow_signature(postponed_flow) |
| 69 |
nothing calls this directly
no outgoing calls
no test coverage detected