• 
      

    Update unit tests for diff line, opcode, and chunk type changes.

    Review Request #14595 — Created Sept. 6, 2025 and submitted

    Information

    Review Board
    master

    Reviewers

    Diff lines, opcodes, and chunks are now all explicitly typed, and we
    made a few tweaks for correctness (such as using None for the line
    numbers for the "other" side of an inserted/deleted chunk instead of an
    empty string).

    This change updates the unit tests that touch these types to make sure
    we're always fully defining the structures. Many of these tests used
    partial dictionaries for chunks, or even used dictionaries with integer
    keys instead of tuples for lines. This of course was flagged by the type
    checker.

    Ran unit tests.

    Summary ID
    Update unit tests for diff line, opcode, and chunk type changes.
    Diff lines, opcodes, and chunks are now all explicitly typed, and we made a few tweaks for correctness (such as using `None` for the line numbers for the "other" side of an inserted/deleted chunk instead of an empty string). This change updates the unit tests that touch these types to make sure we're always fully defining the structures. Many of these tests used partial dictionaries for chunks, or even used dictionaries with integer keys instead of tuples for lines. This of course was flagged by the type checker. Testing Done: Ran unit tests.
    xoyrpplnkqtokuuwtnklzxlwrvsvwvqs
    Description From Last Updated

    Huh, I had never seen this form. It feels less explicit than the explicit tuple.

    chipx86chipx86

    Should document the AssertionError.

    chipx86chipx86
    maubin
    1. Ship It!
    2. 
        
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. Show all issues

      Huh, I had never seen this form. It feels less explicit than the explicit tuple.

    3. reviewboard/diffviewer/tests/test_processors.py (Diff revision 1)
       
       
       
       
       
      Show all issues

      Should document the AssertionError.

    4. 
        
    david
    maubin
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (be2fe0b)