#NEWLINE# def test_pickle_pipeline_graph( ) : #NEWLINE# #INDENT# p = jip . pipelines . Pipeline ( ) #NEWLINE# a = p . job ( 'A' ) . run ( 'bash' , cmd = 'ls' ) #NEWLINE# b = p . job ( 'B' ) . run ( 'bash' , cmd = 'ls' ) #NEWLINE# b . depends_on ( a ) #NEWLINE# pickled = pickle . dumps ( p ) #NEWLINE# assert ( pickled is not None ) #NEWLINE# fresh = pickle . loads ( pickled ) #NEWLINE# assert ( fresh is not None ) #NEWLINE# assert ( len ( fresh ) == 2 ) #NEWLINE# assert ( len ( fresh . _edges ) == 1 ) #NEWLINE# a = fresh . get ( 'A' ) #NEWLINE# b = fresh . get ( 'B' ) #NEWLINE# assert a . has_outgoing ( b )