def test_list(symbols_dir): with open(os.path.join(symbols_dir, "linux.svg"), "w+") as f: pass symbols = Symbols() assert { 'symbol_id': ':/symbols/firewall.svg', 'filename': 'firewall.svg', 'builtin': True } in symbols.list() assert { 'symbol_id': 'linux.svg', 'filename': 'linux.svg', 'builtin': False } in symbols.list()
def test_get_size(): symbols = Symbols() assert symbols.get_size(':/symbols/firewall.svg') == (66, 45, 'svg')
def test_get_path(): symbols = Symbols() assert symbols.get_path(':/symbols/firewall.svg') == get_resource( "symbols/firewall.svg")
def test_get_size(): symbols = Symbols() symbols.theme = "Classic" assert symbols.get_size(':/symbols/classic/firewall.svg') == (66, 45, 'svg')
def test_get_path(): symbols = Symbols() symbols.theme = "Classic" assert symbols.get_path(':/symbols/classic/firewall.svg') == get_resource( "symbols/classic/firewall.svg")