def test_absent(self): with io.open(self.test_file, "w", encoding='utf-8') as f: f.write(resources.unicode_desktop) entry = DesktopEntry(self.test_file) res = entry.findTryExec() assert res is None, repr(res)
def test_present(self): with io.open(self.test_file, "w", encoding='utf-8') as f: f.write(resources.python_desktop) entry = DesktopEntry(self.test_file) res = entry.findTryExec() assert res, repr(res)