(self)
| 124 | async def test_exact_arxiv_source_facts_are_code_owned(self) -> None: |
| 125 | raw = RawPaper( |
| 126 | bytes=_FIXTURE.read_bytes(), |
| 127 | content_type="application/pdf", |
| 128 | source_url="https://arxiv.org/pdf/1706.03762v7.pdf", |
| 129 | resolved_url="https://arxiv.org/pdf/1706.03762v7.pdf", |
| 130 | fetched_at=_WHEN, |
| 131 | arxiv_id="1706.03762v7", |
| 132 | title="Attention Is All You Need", |
| 133 | authors=("Ashish Vaswani",), |
| 134 | published_at=_WHEN, |
| 135 | updated_at=_WHEN, |
| 136 | ) |
| 137 | with patch( |
| 138 | "quantmind.flows.paper.fetch_arxiv", |
| 139 | new=AsyncMock(return_value=raw), |
| 140 | ): |
| 141 | result = await PaperFlow( |
| 142 | PaperSemanticCfg(chunk_size=256, chunk_overlap=32), |
| 143 | _summary_provider=_FakeSummaryProvider(), |
| 144 | ).build(ArxivIdentifier(id="1706.03762v7")) |
| 145 | |
| 146 | self.assertEqual(result.source_revision.arxiv_id, "1706.03762v7") |
| 147 | self.assertEqual(result.source_revision.source.kind, "arxiv") |
| 148 | self.assertEqual( |
| 149 | result.source_revision.title, "Attention Is All You Need" |
| 150 | ) |
| 151 | self.assertEqual( |
nothing calls this directly
no test coverage detected