trunk/c9c53665f67242a8a30caaa42b375e590b99009a: Fix z3 model value comparisons in test_z3_gradual_types (#197424)
- PyTorch 近 90 天出现 1319 次
- PyTorch 近 90 天第 1304 次发版
- 上一次:同一天稍早 · ciflow/trunk/198050
发生了什么
z3's Solver.model()[const].arg(i).arg(j) returns an ArithRef (e.g. IntNumRef), not a Python int. Comparing an ArithRef to a Python int with != produces a z3 BoolRef, which is always truthy in a Python if , so every if ... != expected: raise AssertionError guard fired unconditionally and the cases failed spuriously even when the solver produced the correct value. Convert z3 numerics to Python ints with .as_long() bef…
摘要按规则整理自下方来源原文