summaryrefslogtreecommitdiffstats
path: root/simplejson/tests/test_item_sort_key.py
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2013-09-29 17:48:14 -0400
committerThibaut Horel <thibaut.horel@gmail.com>2013-09-29 17:48:14 -0400
commitef7a80865f253852f7c7b01f04bc02b695ead67b (patch)
treeea718f746b5f9db4624057d1f0aa1df9abee8bd4 /simplejson/tests/test_item_sort_key.py
parent19346fa9068878af516cdb670bea4f791337507b (diff)
downloadlastfm-ef7a80865f253852f7c7b01f04bc02b695ead67b.tar.gz
Giving up on Python 2.5 support
Diffstat (limited to 'simplejson/tests/test_item_sort_key.py')
-rw-r--r--simplejson/tests/test_item_sort_key.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/simplejson/tests/test_item_sort_key.py b/simplejson/tests/test_item_sort_key.py
deleted file mode 100644
index b05bfc8..0000000
--- a/simplejson/tests/test_item_sort_key.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from unittest import TestCase
-
-import simplejson as json
-from operator import itemgetter
-
-class TestItemSortKey(TestCase):
- def test_simple_first(self):
- a = {'a': 1, 'c': 5, 'jack': 'jill', 'pick': 'axe', 'array': [1, 5, 6, 9], 'tuple': (83, 12, 3), 'crate': 'dog', 'zeak': 'oh'}
- self.assertEqual(
- '{"a": 1, "c": 5, "crate": "dog", "jack": "jill", "pick": "axe", "zeak": "oh", "array": [1, 5, 6, 9], "tuple": [83, 12, 3]}',
- json.dumps(a, item_sort_key=json.simple_first))
-
- def test_case(self):
- a = {'a': 1, 'c': 5, 'Jack': 'jill', 'pick': 'axe', 'Array': [1, 5, 6, 9], 'tuple': (83, 12, 3), 'crate': 'dog', 'zeak': 'oh'}
- self.assertEqual(
- '{"Array": [1, 5, 6, 9], "Jack": "jill", "a": 1, "c": 5, "crate": "dog", "pick": "axe", "tuple": [83, 12, 3], "zeak": "oh"}',
- json.dumps(a, item_sort_key=itemgetter(0)))
- self.assertEqual(
- '{"a": 1, "Array": [1, 5, 6, 9], "c": 5, "crate": "dog", "Jack": "jill", "pick": "axe", "tuple": [83, 12, 3], "zeak": "oh"}',
- json.dumps(a, item_sort_key=lambda kv: kv[0].lower()))