Skip to content

Commit ac1bbb0

Browse files
committed
test(verify): cover T2 promotion + T3 hold
1 parent 3b7e049 commit ac1bbb0

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

tests/verify/test_promote_crossref.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,27 @@ def test_green_with_live_t1_promotes():
101101
band="green", source_urls=["https://en.wikipedia.org/wiki/X"],
102102
url_cache=cache, crossref_decision=None,
103103
)
104-
assert d.promote and d.reason == "green+live-t1"
104+
assert d.promote and d.reason == "green+live-source"
105+
106+
107+
def test_green_with_live_t2_promotes():
108+
# A reputable T2 spec/benchmark DB (cpubenchmark) that is alive also promotes.
109+
cache = {"https://www.cpubenchmark.net/cpu.php?id=1": {"alive": True}}
110+
d = promote.decide(
111+
band="green", source_urls=["https://www.cpubenchmark.net/cpu.php?id=1"],
112+
url_cache=cache, crossref_decision=None,
113+
)
114+
assert d.promote and d.reason == "green+live-source"
115+
116+
117+
def test_green_with_only_t3_source_held():
118+
# kaggle (T3) alive is NOT enough to promote even if green.
119+
cache = {"https://www.kaggle.com/x": {"alive": True}}
120+
d = promote.decide(
121+
band="green", source_urls=["https://www.kaggle.com/x"],
122+
url_cache=cache, crossref_decision=None,
123+
)
124+
assert not d.promote
105125

106126

107127
def test_green_without_live_source_blocked():

0 commit comments

Comments
 (0)