def test_create(self): try: fo = FileObject("test", temporary=True) fo.remove() fo.create() if not os.path.exists(fo.path): raise Exception("File has not been created") except Exception as exc: traceback.print_exc() self.fail(exc)