def get_xnote_version(): try: return xutils.readfile("version.txt") except: return ""
def test_save_file(self): tmpfile = os.path.join(xconfig.DATA_DIR, "tmp.txt") xutils.savetofile(tmpfile, "test") content = xutils.readfile(tmpfile) self.assertEqual("test", content) xutils.remove(tmpfile, True)