Skip to content

Commit

Permalink
Skip OrderedDict test for < 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Jahaja committed Feb 7, 2017
1 parent c9f8318 commit 2f1d487
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import json
import math
import time
import sys
import pytz
from collections import OrderedDict

if six.PY2:
import unittest2 as unittest
Expand Down Expand Up @@ -385,7 +385,9 @@ def test_encodeDoubleNegInf(self):
input = -float('inf')
self.assertRaises(OverflowError, ujson.encode, input)

@unittest.skipIf(sys.version_info < (2, 7), "No Ordered dict in < 2.7")
def test_encodeOrderedDict(self):
from collections import OrderedDict
input = OrderedDict([(1, 1), (0, 0), (8, 8), (2, 2)])
self.assertEqual('{"1":1,"0":0,"8":8,"2":2}', ujson.encode(input))

Expand Down

0 comments on commit 2f1d487

Please sign in to comment.