import unittest

from kiel.protocol import primitives


class PrimitivesTests(unittest.TestCase):

    def test_string_repr(self):
        s = primitives.String(u"foobar")

        self.assertEqual(repr(s), '"u\'foobar\'"')

    def test_array_repr(self):
        a = primitives.Array.of(primitives.Int32)([1, 3, 6, 9])

        self.assertEqual(repr(a), "[1, 3, 6, 9]")

import unittest

from kiel.protocol import primitives


class PrimitivesTests(unittest.TestCase):

    def test_string_repr(self):
        s = primitives.String(u"foobar")

        self.assertEqual(repr(s), '%r' % repr(u"foobar"))

    def test_array_repr(self):
        a = primitives.Array.of(primitives.Int32)([1, 3, 6, 9])

        self.assertEqual(repr(a), "[1, 3, 6, 9]")

Fix repr test for py34.
Fix repr test for py34.
