2 from unittest
import TestCase
7 class TestSeparators(TestCase
):
8 def test_separators(self
):
9 h
= [['blorpie'], ['whoops'], [], 'd-shtaeou', 'd-nthiouh', 'i-vhbjkhnth',
10 {'nifty': 87}, {'field': 'yes', 'morefield': False} ]
12 expect
= textwrap
.dedent("""\
35 d2
= json
.dumps(h
, indent
=2, sort_keys
=True, separators
=(' ,', ' : '))
40 self
.assertEquals(h1
, h
)
41 self
.assertEquals(h2
, h
)
42 self
.assertEquals(d2
, expect
)