Bug
Four test files reference stem_and_suffix, a function that does not exist anywhere in the codebase. The correct name is stem_and_affix, defined in core/forms/utils.py.
Impact
tests/test_adoption.py fails at import time with ImportError: cannot import name 'stem_and_suffix' from 'core.forms.utils'
tests/test_agent.py, tests/test_compression.py, and tests/test_induction.py fail at runtime with AttributeError: module 'core.forms.morphology' has no attribute 'stem_and_suffix'
Root cause
core/forms/utils.py defines stem_and_affix (not stem_and_suffix). All four test files use the wrong name.
Affected lines
| File |
Line(s) |
Error type |
tests/test_adoption.py |
18, 50, 132, 136 |
ImportError at import |
tests/test_agent.py |
32 |
AttributeError at runtime |
tests/test_compression.py |
38, 48 |
AttributeError at runtime |
tests/test_induction.py |
33, 41 |
AttributeError at runtime |
Fix
Replace every occurrence of stem_and_suffix with stem_and_affix in the four test files. No production code needs to change. The function signature is identical — (form) -> (stem, affixes).
Bug
Four test files reference
stem_and_suffix, a function that does not exist anywhere in the codebase. The correct name isstem_and_affix, defined incore/forms/utils.py.Impact
tests/test_adoption.pyfails at import time withImportError: cannot import name 'stem_and_suffix' from 'core.forms.utils'tests/test_agent.py,tests/test_compression.py, andtests/test_induction.pyfail at runtime withAttributeError: module 'core.forms.morphology' has no attribute 'stem_and_suffix'Root cause
core/forms/utils.pydefinesstem_and_affix(notstem_and_suffix). All four test files use the wrong name.Affected lines
tests/test_adoption.pyImportErrorat importtests/test_agent.pyAttributeErrorat runtimetests/test_compression.pyAttributeErrorat runtimetests/test_induction.pyAttributeErrorat runtimeFix
Replace every occurrence of
stem_and_suffixwithstem_and_affixin the four test files. No production code needs to change. The function signature is identical —(form) -> (stem, affixes).