示例#1
0
def test4():
    '''ASTRODATA-close TEST 4: SEF, Closing AD subdata will not affect hdulist  
    '''
    ad = AstroData(sci1)
    ad['SCI', 1].close()
    assert_not_equal(ad.hdulist, None, msg='original hdulist is None')
    ad.close() 
def test1():
    """ASTRODATA-deepcopy TEST 1: Pyfits HDUList id's are not equal (MEF)"""
    ad = AstroData(sci123)
    adDeepcopy = deepcopy(ad)
    adIdlist = []
    adDeepcopyIdlist = []
    for ext in ad:
        adIdlist.append(id(ext.hdulist[1]))
    for dext in adDeepcopy:
        adDeepcopyIdlist.append(id(dext.hdulist[1]))
    assert_not_equal(adIdlist, adDeepcopyIdlist, msg="hdulist ids are equal")
    ad.close()
    adDeepcopy.close()