hRobert12 / mock

Automatically exported from code.google.com/p/mock
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

_format_call_signature should sort keyword-argment items #214

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Printing call args produces non-deterministic results, making them more or less 
useless in doctests.

kwargs_string = ', '.join([
        '%s=%r' % (key, value) for key, value in kwargs.items()
    ])

should be:

kwargs_string = ', '.join([
        '%s=%r' % (key, value) for key, value in sorted(kwargs.items())
    ])

Original issue reported on code.google.com by j1m...@gmail.com on 16 Sep 2013 at 4:54