Пример #1
0
    def test_to_bits_from_bits_round_trip(self):
        np = NodePickler()
        
        a = Literal(u'''A test with a \\n (backslash n), "\u00a9" , and newline \n and a second line.
''')
        b = np.loads(np.dumps(a))
        self.assertEquals(a, b)
Пример #2
0
    def test_literal_cases(self):
        np = NodePickler()

        for l in cases:
            a = Literal(l)
            b = np.loads(np.dumps(a))
            self.assertEqual(a, b)
Пример #3
0
    def test_literal_cases(self): 
        np = NodePickler()

        for l in cases: 
            a = Literal(l)
            b = np.loads(np.dumps(a))
            self.assertEquals(a, b)
Пример #4
0
    def test_to_bits_from_bits_round_trip(self):
        np = NodePickler()

        a = Literal(
            """A test with a \\n (backslash n), "\u00a9" , and newline \n and a second line.
""")
        b = np.loads(np.dumps(a))
        self.assertEqual(a, b)