Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)
Creates a temporary file on disk.

Args:
  tmpdir: The temporary directory to place the file in. If not specified, a
          new temporary directory is created.
  file_name: The name to use for the file. If not specified, a temporary
             test file name is constructed. This can also be a tuple, where
             ('dir', 'foo') means to create a file named 'foo' inside a
             subdirectory named 'dir'.
  contents: The contents to write to the file. If not specified, a test(more...)

src/g/s/gsutil-3.42/gslib/tests/test_cp_funcs.py   gsutil(Download)
    objects = ['obj1', '42', 'obj2', '314159']
    contents = '\n'.join([random_prefix] + objects)
    fpath = self.CreateTempFile(file_name='foo',
                                contents=contents)
    expected_objects = [ObjectFromTracker(objects[2 * i], objects[2 * i + 1])
  def test_CreateParallelUploadTrackerFile(self):
    tracker_file = self.CreateTempFile(file_name='foo', contents='asdf')
    tracker_file_lock = CreateLock()
    random_prefix = '123'
    objects = ['obj1', '42', 'obj2', '314159']
  def test_AppendComponentTrackerToParallelUploadTrackerFile(self):
    tracker_file = self.CreateTempFile(file_name='foo', contents='asdf')
    tracker_file_lock = CreateLock()
    random_prefix = '123'
    objects = ['obj1', '42', 'obj2', '314159']

src/g/s/gsutil-HEAD/gslib/tests/test_cp_funcs.py   gsutil(Download)
    objects = ['obj1', '42', 'obj2', '314159']
    contents = '\n'.join([random_prefix] + objects)
    fpath = self.CreateTempFile(file_name='foo',
                                contents=contents)
    expected_objects = [ObjectFromTracker(objects[2 * i], objects[2 * i + 1])
  def test_CreateParallelUploadTrackerFile(self):
    tracker_file = self.CreateTempFile(file_name='foo', contents='asdf')
    tracker_file_lock = CreateLock()
    random_prefix = '123'
    objects = ['obj1', '42', 'obj2', '314159']
  def test_AppendComponentTrackerToParallelUploadTrackerFile(self):
    tracker_file = self.CreateTempFile(file_name='foo', contents='asdf')
    tracker_file_lock = CreateLock()
    random_prefix = '123'
    objects = ['obj1', '42', 'obj2', '314159']

src/g/s/gsutil-HEAD/gslib/tests/test_command_runner.py   gsutil(Download)
    self.previous_update_file = (
        command_runner.LAST_CHECKED_FOR_GSUTIL_UPDATE_TIMESTAMP_FILE)
    self.timestamp_file = self.CreateTempFile()
    command_runner.LAST_CHECKED_FOR_GSUTIL_UPDATE_TIMESTAMP_FILE = (
        self.timestamp_file)

src/g/s/gsutil-3.42/gslib/tests/test_command_runner.py   gsutil(Download)
    self.previous_update_file = (
        command_runner.LAST_CHECKED_FOR_GSUTIL_UPDATE_TIMESTAMP_FILE)
    self.timestamp_file = self.CreateTempFile()
    command_runner.LAST_CHECKED_FOR_GSUTIL_UPDATE_TIMESTAMP_FILE = (
        self.timestamp_file)