MCPcopy Create free account
hub / github.com/LLMQuant/quant-mind / PaperInputDiscriminatedTests

Class PaperInputDiscriminatedTests

tests/configs/test_paper.py:28–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 self.assertEqual(cfg.summary_research_group_size, 8)
27 self.assertEqual(cfg.summary_concurrency, 4)
28 self.assertEqual(cfg.max_summary_output_tokens, 4_096)
29 self.assertEqual(cfg.min_summary_citations, 3)
30 self.assertEqual(cfg.min_summary_pages, 2)
31
32 def test_invalid_overlap_or_coverage_bounds_are_rejected(self):
33 with self.assertRaises(ValidationError):
34 PaperSemanticCfg(chunk_size=64, chunk_overlap=64)
35 with self.assertRaises(ValidationError):
36 PaperSemanticCfg(min_summary_citations=1, min_summary_pages=2)
37
38
39class PaperInputDiscriminatedTests(unittest.TestCase):
40 def setUp(self):
41 self.adapter = TypeAdapter(PaperInput)
42
43 def test_arxiv_round_trip(self):
44 v = self.adapter.validate_python({"type": "arxiv", "id": "2604.12345"})
45 self.assertIsInstance(v, ArxivIdentifier)
46 self.assertEqual(v.id, "2604.12345")
47
48 def test_http(self):
49 v = self.adapter.validate_python(
50 {"type": "http", "url": "https://example.com/p.pdf"}
51 )
52 self.assertIsInstance(v, HttpUrl)
53
54 def test_local(self):
55 v = self.adapter.validate_python(
56 {"type": "local", "path": "/tmp/p.pdf"}
57 )
58 self.assertIsInstance(v, LocalFilePath)
59 self.assertEqual(v.path, Path("/tmp/p.pdf"))
60
61 def test_text(self):
62 v = self.adapter.validate_python({"type": "text", "text": "hello"})
63 self.assertIsInstance(v, RawText)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected