Skip to content

Commit

Permalink
Dont test this in PyPy due to sort order issue
Browse files Browse the repository at this point in the history
PyPy is ordering the dict iteration different than cpython causing the test to fail
  • Loading branch information
gmr committed Feb 17, 2014
1 parent d7d293e commit 43904ff
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tests/data_tests.py
Expand Up @@ -5,6 +5,7 @@
"""
import datetime
import decimal
import platform
try:
import unittest2 as unittest
except ImportError:
Expand All @@ -25,19 +26,22 @@ class DataTests(unittest.TestCase):
'\x04Test\x0ctimestampvalT\x00\x00\x00\x00Ec)\x92'
'\x07decimalD\x02\x00\x00\x01:\x07boolvalt\x01'
'\x0bdecimal_tooD\x00\x00\x00\x00d')
FIELD_TBL_VALUE = {'intval': 1,
'strval': 'Test',

FIELD_TBL_VALUE = {'array': [1, 2, 3],
'boolval': True,
'unicode': u'utf8=✓',
'decimal': decimal.Decimal('3.14'),
'decimal_too': decimal.Decimal('100'),
'timestampval': datetime.datetime(2006, 11, 21, 16, 30,
10),
'dictval': {'foo': 'bar'},
'intval': 1,
'longval': long(912598613),
'array': [1, 2, 3],
'null': None,
'dictval': {'foo': 'bar'}}
'strval': 'Test',
'timestampval': datetime.datetime(2006, 11, 21, 16, 30,
10),
'unicode': u'utf8=✓'}

@unittest.skipIf(platform.python_implementation() == 'PyPy',
'pypy sort order issue')
def test_encode_table(self):
result = []
data.encode_table(result, self.FIELD_TBL_VALUE)
Expand Down

0 comments on commit 43904ff

Please sign in to comment.