Exemple #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())
 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)
Exemple #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))