Example #1
0
 def test_write_file_exist(self):
     fileutil.write_to_file(self.already_file, self.content)
     assert os.path.exists(self.already_file)
     assert os.path.exists("%s.1" % self.already_file)
     self._compare_content(self.already_file)
Example #2
0
 def test_write_file_exist_dir(self):
     fileutil.write_to_file(self.already_dir, self.content)
     realfile = os.path.join(self.already_dir, fileutil.DEFAULT_FILE_NAME)
     assert os.path.exists(realfile)
     self._compare_content(realfile)
Example #3
0
 def test_write_file(self):
     filename = "filename"
     fileutil.write_to_file(filename, self.content)
     assert os.path.exists(filename)
     self._compare_content(filename)
Example #4
0
def write_file_handler(app):
    snippet = buffers.get_content(app)
    filename = app.snippet_file
    fileutil.write_to_file(filename, snippet)
Example #5
0
 def test_write_file_exist_dir(self):
     fileutil.write_to_file(self.already_dir, self.content)
     realfile = os.path.join(self.already_dir, fileutil.DEFAULT_FILE_NAME)
     assert os.path.exists(realfile)
     self._compare_content(realfile)
Example #6
0
 def test_write_file_exist(self):
     fileutil.write_to_file(self.already_file, self.content)
     assert os.path.exists(self.already_file)
     assert os.path.exists("%s.1" % self.already_file)
     self._compare_content(self.already_file)
Example #7
0
 def test_write_file(self):
     filename = "filename"
     fileutil.write_to_file(filename, self.content)
     assert os.path.exists(filename)
     self._compare_content(filename)