Skip to content

Commit 7fff616

Browse files
committed
Supporting Python 2.6
1 parent 9d2ba6f commit 7fff616

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

source_py2/test_python_toolbox/test_nifty_collections/test_ordered_and_definitely_unordered.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import multiprocessing.queues
66
import Queue as queue_module
77

8+
import python_toolbox.third_party
89
from python_toolbox import nifty_collections
910
from python_toolbox.nifty_collections import Ordered, DefinitelyUnordered
1011

@@ -28,17 +29,20 @@ def _make_instance_of_type(type_):
2829

2930

3031
def test():
31-
ordereds = {
32+
ordereds = set((
3233
list, tuple, str, bytearray, bytes,
33-
nifty_collections.OrderedDict, collections.OrderedDict,
34+
nifty_collections.OrderedDict,
35+
nifty_collections.ordered_dict.StdlibOrderedDict,
3436
nifty_collections.OrderedBag, nifty_collections.FrozenOrderedBag,
3537
collections.deque
36-
}
37-
definitely_unordereds = {
38-
set, frozenset, collections.defaultdict, collections.Counter,
38+
))
39+
definitely_unordereds = set((
40+
set, frozenset, collections.defaultdict,
41+
python_toolbox.third_party.collections.Counter,
3942
nifty_collections.Bag, nifty_collections.FrozenBag
40-
}
41-
other_unordereds = {iter({1, 2, 3}), iter({1: 2,}), iter(frozenset('abc'))}
43+
))
44+
other_unordereds = set((iter(set((1, 2, 3))), iter({1: 2,}),
45+
iter(frozenset('abc'))))
4246

4347
things = ordereds | definitely_unordereds | other_unordereds
4448

0 commit comments

Comments
 (0)