diff options
author | Joel Nothman <joel.nothman@gmail.com> | 2012-09-23 19:37:28 +1000 |
---|---|---|
committer | Joel Nothman <joel.nothman@gmail.com> | 2012-09-23 19:37:28 +1000 |
commit | 77942514db0c5a80e9f3f9bcb1e1939ecc8705e6 (patch) | |
tree | d3fdec62e6250cf329284a309dd468f019583d05 /test/test_pack.py | |
parent | b06ed8eb75563111ef88a119f9f7a45e67f61736 (diff) | |
download | msgpack-python-77942514db0c5a80e9f3f9bcb1e1939ecc8705e6.tar.gz |
Implement object_pairs_hook
Diffstat (limited to 'test/test_pack.py')
-rw-r--r-- | test/test_pack.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test_pack.py b/test/test_pack.py index b216c46..2c99873 100644 --- a/test/test_pack.py +++ b/test/test_pack.py @@ -111,10 +111,9 @@ def test_odict(): seq = [(b'one', 1), (b'two', 2), (b'three', 3), (b'four', 4)] od = odict(seq) assert_equal(unpackb(packb(od)), dict(seq)) - # After object_pairs_hook is implemented. - #def pair_hook(seq): - # return seq - #assert_equal(unpackb(packb(od), object_pairs_hook=pair_hook), seq) + def pair_hook(seq): + return seq + assert_equal(unpackb(packb(od), object_pairs_hook=pair_hook), seq) if __name__ == '__main__': |