def test_module_scope_is_updated_on_patch(expected_attrs):
 from gooey.gui import image_repository
 testing_icons = ('config_icon.png', 'success_icon.png')
 try:
  make_user_files(*testing_icons)
  old_icon = image_repository.config_icon
  image_repository.patch_images(tempfile.tempdir)
  new_icon = image_repository.config_icon
  assert (old_icon != new_icon)
 finally:
  cleanup_temp(*testing_icons)

def test_module_scope_is_updated_on_patch ( expected_attrs ) : from gooey . gui import image_repository testing_icons = ( 'config_icon.png' , 'success_icon.png' ) try : make_user_files ( * testing_icons ) old_icon = image_repository . config_icon image_repository . patch_images ( tempfile . tempdir ) new_icon = image_repository . config_icon assert ( old_icon != new_icon ) finally : cleanup_temp ( * testing_icons )
patch should update the modules globals() on success .