• 
      

    Add unit tests for @spina, and fix various issues that were found.

    Review Request #12918 — Created March 24, 2023 and submitted

    Information

    Spina
    master

    Reviewers

    This change adds unit tests that cover the @spina decorator, testing
    all options and behaviors.

    While working on this, the following issues were found and fixed:

    • Instances created from a Spina class were lacking the typing to access
      Spina state and methods.

    • __spinaOptions wasn't marked readonly (fixing this required adding a
      new MutableSpinaClass so class prep could set this option).

    • __spinaOptions was always duplicated, wasting memory, since we
      weren't checking for emptiness correctly.

    • automergeAttrs retained attributes that were skipped.

    • Wrong names for classes could be used.

    • __super__ wasn't read-only.

    Unit tests pass.

    Summary ID
    Add unit tests for @spina, and fix various issues that were found.
    This change adds unit tests that cover the `@spina` decorator, testing all options and behaviors. While working on this, the following issues were found and fixed: * Instances created from a Spina class were lacking the typing to access Spina state and methods. * `__spinaOptions` wasn't marked readonly (fixing this required adding a new `MutableSpinaClass` so class prep could set this option). * `__spinaOptions` was always duplicated, wasting memory, since we weren't checking for emptiness correctly. * `automergeAttrs` retained attributes that were skipped. * Wrong names for classes could be used. * `__super__` wasn't read-only.
    0af66a34ad911bf252368c2f99581341d3a79407
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (6fdf9b5)