Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #5
0
def pickle_t3st():
    print ("test of node pickle")
    
    print (__global_test_data__)
    np = NodePickler()
    fil = open("testdata.pickle","w")
    fil.write (np.dumps(__global_test_data__))
    fil.close()
Beispiel #6
0
def pickle_t3st():
    print("test of node pickle")

    print(__global_test_data__)
    np = NodePickler()
    fil = open("testdata.pickle", "w")
    fil.write(np.dumps(__global_test_data__))
    fil.close()