• 
      

    Fix a unit test issue with dictionary sort order on Python 3.5.

    Review Request #11137 — Created Aug. 12, 2020 and submitted

    Information

    kgb
    master

    Reviewers

    kgb

    On Python 3.5, the assertSpyCalledWith() unit test was comparing
    assertion errors that involved the order of keys in a dictionary. All
    versions of Python happened to have the same order, with the exception
    of Python 3.5.

    There was an attempt at sorting, but it wasn't done correctly. Keys were
    being sorted and then put back into a dictionary, which was unsorted. So
    now we don't do this. Instead, a string representation of a dictionary
    is built, with the key/value pairs built as a string, using the sorted
    keys.

    Unit tests pass for all versions of Python.

    Summary ID
    Fix a unit test issue with dictionary sort order on Python 3.5.
    On Python 3.5, the `assertSpyCalledWith()` unit test was comparing assertion errors that involved the order of keys in a dictionary. All versions of Python happened to have the same order, with the exception of Python 3.5. There was an attempt at sorting, but it wasn't done correctly. Keys were being sorted and then put back into a dictionary, which was unsorted. So now we don't do this. Instead, a string representation of a dictionary is built, with the key/value pairs built as a string, using the sorted keys.
    9d9459660b68f220c6fe6c6680cabcd6c2df7ffe
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (2ad3f1d)