Ejemplo n.º 1
0
 def testEmitter(self):
     thread = MyThread(N)
     thread.start()
     syck.emit(DATA_FOR_EMITTER)
     thread.stop()
     #print "testEmitter value:", thread.value
     self.assert_(thread.done())
Ejemplo n.º 2
0
 def testBuggyNodesReduce(self):
     object = syck.load(BUGGY_NODES)
     nodes = syck.parse(BUGGY_NODES)
     output = syck.dump(nodes)
     #print output
     nodes2 = syck.load(output)
     output2 = syck.emit(nodes2)
     object2 = syck.load(output2)
     self.assertEqual(object, object2)
Ejemplo n.º 3
0
 def testStringDocument(self):
     source = syck.emit(test_emitter.EXAMPLE)
     node = syck.parse(source)
     self.assertEqual(test_emitter.strip(test_emitter.EXAMPLE),
             test_emitter.strip(node))