Skip to content

stem_and_suffix does not exist — tests fail with ImportError/AttributeError #5

Description

@bitflicker64

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions