def test_CursorAlias_extension_excpetion(static_bitmap) -> None: """Testing CursorAlias extension ``FileNotFoundError``(If alias file not created) exception.""" alias = CursorAlias(static_bitmap) with pytest.raises(FileNotFoundError) as excinfo: alias.extension() alias.extension(".test") assert str(excinfo.value) == alias_not_exists_err shutil.rmtree(alias.alias_dir)
def test_CursorAlias_extension(static_bitmap) -> None: """Testing CursorAlias ``extension`` method.""" alias = CursorAlias(static_bitmap) alias.create((10, 10)) assert alias.alias_file.suffix == ".alias" assert alias.extension() == ".alias" alias.extension(".test") assert alias.alias_file.suffix == ".test" assert alias.extension() == ".test" shutil.rmtree(alias.alias_dir)