added
This commit is contained in:
1 parent
47158af30a
commit
67a7c79639
33 files changed
+1393
-32
No files matched your search
@@ -19,4 +19,26 @@ class Tests(unittest.TestCase):
|
||||
self.mutate('source_url','');self.assertTrue(m.validate(self.p))
|
||||
def test_wrong_window(self):
|
||||
p=self.p/'evidence.json';d=json.loads(p.read_text(encoding='utf-8'));d['window_start']='2026-06-14T10:01:35-07:00';p.write_text(json.dumps(d));self.assertTrue(m.validate(self.p))
|
||||
def gaps(self, queries=True):
|
||||
p=self.p/'search-log.json';d=json.loads(p.read_text(encoding='utf-8'))
|
||||
d['coverage_status']='completed-with-gaps';d['coverage_gaps']=[{'engine':'exa','reason':'Exa source retrieval unavailable'}]
|
||||
if not queries:d['exa']['queries']=[]
|
||||
p.write_text(json.dumps(d),encoding='utf-8')
|
||||
for name in ['standard-web.md','exa.md','comparison.md']:
|
||||
q=self.p/name;q.write_text(q.read_text(encoding='utf-8')+'\ncompleted-with-gaps: Exa source retrieval unavailable\n',encoding='utf-8')
|
||||
def test_gaps_deliverable(self):
|
||||
self.gaps(False);self.assertEqual(m.validate(self.p),[]);self.assertFalse(m.checkpoint_eligible(self.p))
|
||||
def test_full_checkpoint(self):self.assertTrue(m.checkpoint_eligible(self.p))
|
||||
def test_gaps_cannot_excuse_unopened_source(self):
|
||||
self.gaps();self.mutate('source_opened',False);self.assertTrue(m.validate(self.p))
|
||||
def test_gaps_cannot_excuse_old_evidence(self):
|
||||
self.gaps();self.mutate('evidence_date','2026-06-01');self.assertTrue(m.validate(self.p))
|
||||
def test_gaps_require_disclosure(self):
|
||||
self.gaps();p=self.p/'comparison.md';p.write_text('No gaps',encoding='utf-8');self.assertTrue(m.validate(self.p))
|
||||
def test_gap_requires_reason(self):
|
||||
self.gaps();p=self.p/'search-log.json';d=json.loads(p.read_text());d['coverage_gaps'][0]['reason']='';p.write_text(json.dumps(d));self.assertTrue(m.validate(self.p))
|
||||
def test_missing_search_not_silent(self):
|
||||
p=self.p/'search-log.json';d=json.loads(p.read_text());d['exa']['queries']=[];p.write_text(json.dumps(d));self.assertTrue(m.validate(self.p))
|
||||
def test_gap_cannot_excuse_missing_artifact(self):
|
||||
self.gaps();(self.p/'exa.md').unlink();self.assertTrue(m.validate(self.p))
|
||||
if __name__=='__main__':unittest.main()
|
||||
Reference in new issue
Block a user