@image_comparison(baseline_images=[u'EventCollection_plot__switch_orientation__2x'])
def test__EventCollection__switch_orientation_2x():
 (splt, coll, props) = generate_EventCollection_plot()
 coll.switch_orientation()
 coll.switch_orientation()
 new_positions = coll.get_positions()
 assert_equal(props[u'orientation'], coll.get_orientation())
 assert_equal(True, coll.is_horizontal())
 np.testing.assert_array_equal(props[u'positions'], new_positions)
 check_segments(coll, new_positions, props[u'linelength'], props[u'lineoffset'], props[u'orientation'])
 splt.set_title(u'EventCollection: switch_orientation 2x')

@ image_comparison ( baseline_images = [ u'EventCollection_plot__switch_orientation__2x' ] ) def test__EventCollection__switch_orientation_2x ( ) : ( splt , coll , props ) = generate_EventCollection_plot ( ) coll . switch_orientation ( ) coll . switch_orientation ( ) new_positions = coll . get_positions ( ) assert_equal ( props [ u'orientation' ] , coll . get_orientation ( ) ) assert_equal ( True , coll . is_horizontal ( ) ) np . testing . assert_array_equal ( props [ u'positions' ] , new_positions ) check_segments ( coll , new_positions , props [ u'linelength' ] , props [ u'lineoffset' ] , props [ u'orientation' ] ) splt . set_title ( u'EventCollection: switch_orientation 2x' )
check to make sure calling switch_orientation twice sets the orientation back to the default .