diff options
author | Xtreak <tir.karthi@gmail.com> | 2019-09-09 10:55:22 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2019-09-09 10:55:22 (GMT) |
commit | 9d607061c9c888913ae2c18543775cf360d55f27 (patch) | |
tree | 1c98b9421d17c9b5ae54c661628d9900e3d646a9 /Lib/unittest/test | |
parent | 63c98ed2d21d22b46f3517fd7dfd88f0c1521299 (diff) | |
download | cpython-9d607061c9c888913ae2c18543775cf360d55f27.zip cpython-9d607061c9c888913ae2c18543775cf360d55f27.tar.gz cpython-9d607061c9c888913ae2c18543775cf360d55f27.tar.bz2 |
bpo-37212: Preserve keyword argument order in unittest.mock.call and error messages (GH-14310)
Diffstat (limited to 'Lib/unittest/test')
-rw-r--r-- | Lib/unittest/test/testmock/testmock.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py index 265eb1b..581afaa 100644 --- a/Lib/unittest/test/testmock/testmock.py +++ b/Lib/unittest/test/testmock/testmock.py @@ -1571,11 +1571,11 @@ class MockTest(unittest.TestCase): m.assert_called_once() self.assertNotIn("Calls:", str(e.exception)) - #Issue21256 printout of keyword args should be in deterministic order - def test_sorted_call_signature(self): + #Issue37212 printout of keyword args now preserves the original order + def test_ordered_call_signature(self): m = Mock() m.hello(name='hello', daddy='hero') - text = "call(daddy='hero', name='hello')" + text = "call(name='hello', daddy='hero')" self.assertEqual(repr(m.hello.call_args), text) #Issue21270 overrides tuple methods for mock.call objects |