mirror of https://github.com/mahmoud/boltons.git
2.6 fixes
This commit is contained in:
parent
5db8df959b
commit
ed378df313
|
@ -182,7 +182,11 @@ def test_poplast():
|
|||
|
||||
|
||||
def test_reversed():
|
||||
from collections import OrderedDict
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except:
|
||||
# skip on python 2.6
|
||||
return
|
||||
for items in _ITEMSETS:
|
||||
omd = OMD(items)
|
||||
od = OrderedDict(items)
|
||||
|
|
|
@ -28,8 +28,16 @@ _TEST_TMPLS = ["example 1: {hello}",
|
|||
"example 2: {hello:*10}",
|
||||
"example 3: {hello:*{width}}",
|
||||
"example 4: {hello!r:{fchar}{width}}, {width}, yes",
|
||||
"example 5: {0}, {1:d}, {2:f}, {1}",
|
||||
"example 6: {}, {}, {}, {1}"]
|
||||
"example 5: {0}, {1:d}, {2:f}, {1}"]
|
||||
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
pass # skip the non-2.6 compatible tests on 2.6
|
||||
else:
|
||||
_TEST_TMPLS.append("example 6: {}, {}, {}, {1}")
|
||||
finally:
|
||||
del OrderedDict
|
||||
|
||||
|
||||
def test_get_fstr_args():
|
||||
|
|
Loading…
Reference in New Issue