def test_set_format_basic():
 for (format, value) in (('jd', 2451577.5), ('mjd', 51577.0), ('cxcsec', 65923264.184), ('datetime', datetime.datetime(2000, 2, 3, 0, 0)), ('iso', '2000-02-03 00:00:00.000')):
  t = Time('+02000-02-03', format='fits')
  t0 = t.replicate()
  t.format = format
  assert (t.value == value)
  assert (t._time.jd1 is t0._time.jd1)
  assert (t._time.jd2 is t0._time.jd2)

def test_set_format_basic ( ) : for ( format , value ) in ( ( 'jd' , 2451577.5 ) , ( 'mjd' , 51577.0 ) , ( 'cxcsec' , 65923264.184 ) , ( 'datetime' , datetime . datetime ( 2000 , 2 , 3 , 0 , 0 ) ) , ( 'iso' , '2000-02-03 00:00:00.000' ) ) : t = Time ( '+02000-02-03' , format = 'fits' ) t0 = t . replicate ( ) t . format = format assert ( t . value == value ) assert ( t . _time . jd1 is t0 . _time . jd1 ) assert ( t . _time . jd2 is t0 . _time . jd2 )
test basics of setting format attribute .