'Test that opening a file containing a groups HDU in update mode and
then immediately closing it does not result in any unnecessary file
modifications.
Similar to
test_image.TestImageFunctions.test_open_scaled_in_update_mode().'

def test_open_groups_in_update_mode(self):

    self.copy_file('random_groups.fits')
    mtime = os.stat(self.temp('random_groups.fits')).st_mtime
    time.sleep(1)
    fits.open(self.temp('random_groups.fits'), mode='update', memmap=False).close()
    assert (mtime == os.stat(self.temp('random_groups.fits')).st_mtime)
