test(inc2): strengthen for_one_cup confuser to unconditional asserts on m and category
This commit is contained in:
parent
fd6ab0359f
commit
b0bfb8a660
1 changed files with 4 additions and 6 deletions
|
|
@ -237,9 +237,7 @@ def test_for_one_cup_hard_confuser_emits_nothing_no_fallback_to_earlier_a():
|
||||||
registry = load_ratified_registry()
|
registry = load_ratified_registry()
|
||||||
stmt = "Alexa has a lemonade stand where she sells lemonade for $2 for one cup."
|
stmt = "Alexa has a lemonade stand where she sells lemonade for $2 for one cup."
|
||||||
m = match(stmt, registry)
|
m = match(stmt, registry)
|
||||||
if m is not None and m.category is ShapeCategory.RATE_WITH_CURRENCY:
|
assert m is not None
|
||||||
emitted = inject_from_match(m, stmt, sealed=False)
|
assert m.category is ShapeCategory.RATE_WITH_CURRENCY
|
||||||
assert emitted == (), "must refuse for 'for one cup' without falling back to earlier 'a'"
|
emitted = inject_from_match(m, stmt, sealed=False)
|
||||||
# If m is None for some registry reason, the rate path is not taken,
|
assert emitted == ()
|
||||||
# which is also refusal (no bogus emission). The key is no emission
|
|
||||||
# using a wrong verb.
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue