def test_bool():
 t = Time(np.arange(50000, 50010), format='mjd', scale='utc')
 assert (bool(t) is True)
 assert (bool(t[0]) is True)
 assert (bool(t[:0]) is False)

def test_bool ( ) : t = Time ( np . arange ( 50000 , 50010 ) , format = 'mjd' , scale = 'utc' ) assert ( bool ( t ) is True ) assert ( bool ( t [ 0 ] ) is True ) assert ( bool ( t [ : 0 ] ) is False )
any time object should evaluate to true unless it is empty [#3520] .