def test_quantity_pickelability():
 q1 = (np.arange(10) * u.m)
 q2 = pickle.loads(pickle.dumps(q1))
 assert np.all((q1.value == q2.value))
 assert q1.unit.is_equivalent(q2.unit)
 assert (q1.unit == q2.unit)

def test_quantity_pickelability ( ) : q1 = ( np . arange ( 10 ) * u . m ) q2 = pickle . loads ( pickle . dumps ( q1 ) ) assert np . all ( ( q1 . value == q2 . value ) ) assert q1 . unit . is_equivalent ( q2 . unit ) assert ( q1 . unit == q2 . unit )
testing pickleability of quantity .