Example #1
0
 def get_content(self):
     with tempfile.NamedTemporaryFile('w+', suffix='diffoscope') as f:
         f.write(format_symlink(self.symlink_destination))
         f.flush()
         self._path = f.name
         yield
         self._path = None
Example #2
0
 def create_placeholder(self):
     with get_named_temporary_file('w+', delete=False) as f:
         f.write(format_symlink(self.symlink_destination))
         f.flush()
         return f.name