tests: Add basic test for OrderedDict.
Mostly to have coverage of newly added code in map.c.
This commit is contained in:
parent
0ef01d0a75
commit
d48035b06b
|
@ -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()))
|
Loading…
Reference in New Issue