def test_replicate_value_error():
 t1 = Time('2007:001', scale='tai')
 with pytest.raises(ValueError) as err:
  t1.replicate(format='definitely_not_a_valid_format')
 assert ('format must be one of' in str(err))

def test_replicate_value_error ( ) : t1 = Time ( '2007:001' , scale = 'tai' ) with pytest . raises ( ValueError ) as err : t1 . replicate ( format = 'definitely_not_a_valid_format' ) assert ( 'format must be one of' in str ( err ) )
passing a bad format to replicate should raise valueerror .