tests: Add basic test for OrderedDict.

Mostly to have coverage of newly added code in map.c.
This commit is contained in:
Paul Sokolovsky 2015-03-18 01:25:04 +02:00 committed by Damien George
parent 0ef01d0a75
commit d48035b06b
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
try:
from collections import OrderedDict
except ImportError:
try:
from _collections import OrderedDict
except ImportError:
print("SKIP")
import sys
sys.exit()
d = OrderedDict([(10, 20), ("b", 100), (1, 2)])
print(list(d.keys()))
print(list(d.values()))
del d["b"]
print(list(d.keys()))
print(list(d.values()))