def test_init_with_header():
 original_header = fits.Header([('a', 10)])
 new_header = fits.Header(original_header, copy=True)
 original_header['a'] = 20
 assert (new_header['a'] == 10)
 new_header['a'] = 0
 assert (original_header['a'] == 20)

def test_init_with_header ( ) : original_header = fits . Header ( [ ( 'a' , 10 ) ] ) new_header = fits . Header ( original_header , copy = True ) original_header [ 'a' ] = 20 assert ( new_header [ 'a' ] == 10 ) new_header [ 'a' ] = 0 assert ( original_header [ 'a' ] == 20 )
make sure that creating a header from another header makes a copy if copy is true .