def test_load_images_bad_path(self, _init_pygame): loader = BlockingThreadedResourceLoader() theme = UIAppearanceTheme(loader) theme.ui_element_image_locs['button'] = {'regular_path': {'changed': True, 'path': 'not_an_image.png'}} with pytest.warns(UserWarning, match="Unable to load resource"): theme._load_images() loader.start() loader.update()
def test_load_images_bad_path(self, _init_pygame): theme = UIAppearanceTheme() theme.ui_element_image_paths['button'] = { 'regular_path': { 'changed': True, 'path': 'not_an_image.png' } } with pytest.warns(UserWarning, match="Unable to load image at path"): theme._load_images()