def precreate_tempfiles(self, count):
    'Pre-create a specific number of temporary files.\n\n        This will call :py:func:`~rbtools.utils.filesystem.make_tempfile`\n        the specified number of times, returning the list of generated temp\n        file paths, and will then spy that function to return those temp\n        files.\n\n        Once each pre-created temp file is used up, any further calls to\n        :py:func:`~rbtools.utils.filesystem.make_tempfile` will result in\n        an error, failing the test.\n\n        This is useful in unit tests that need to script a series of\n        expected calls using :py:mod:`kgb` (such as through\n        :py:class:`kgb.ops.SpyOpMatchInOrder`) that need to know the names\n        of temporary filenames up-front.\n\n        Unit test suites that use this must mix in :py:class:`kgb.SpyAgency`.\n\n        Args:\n            count (int):\n                The number of temporary filenames to pre-create.\n\n        Raises:\n            AssertionError:\n                The test suite class did not mix in :py:class:`kgb.SpyAgency`.\n        '
    assert hasattr(self, 'spy_on'), ('%r must mix in kgb.SpyAgency in order to call this method.' % self.__class__)
    tmpfiles = [make_tempfile() for i in range(count)]
    self.spy_on(make_tempfile, op=kgb.SpyOpReturnInOrder(tmpfiles))
    return tmpfiles
Pre-create a specific number of temporary files.

This will call :py:func:`~rbtools.utils.filesystem.make_tempfile`
the specified number of times, returning the list of generated temp
file paths, and will then spy that function to return those temp
files.

Once each pre-created temp file is used up, any further calls to
:py:func:`~rbtools.utils.filesystem.make_tempfile` will result in
an error, failing the test.

This is useful in unit tests that need to script a series of
expected calls using :py:mod:`kgb` (such as through
:py:class:`kgb.ops.SpyOpMatchInOrder`) that need to know the names
of temporary filenames up-front.

Unit test suites that use this must mix in :py:class:`kgb.SpyAgency`.

Args:
    count (int):
        The number of temporary filenames to pre-create.

Raises:
    AssertionError:
        The test suite class did not mix in :py:class:`kgb.SpyAgency`.
def precreate_tempfiles(self, count):
    'Pre-create a specific number of temporary files.\n\n        This will call :py:func:`~rbtools.utils.filesystem.make_tempfile`\n        the specified number of times, returning the list of generated temp\n        file paths, and will then spy that function to return those temp\n        files.\n\n        Once each pre-created temp file is used up, any further calls to\n        :py:func:`~rbtools.utils.filesystem.make_tempfile` will result in\n        an error, failing the test.\n\n        This is useful in unit tests that need to script a series of\n        expected calls using :py:mod:`kgb` (such as through\n        :py:class:`kgb.ops.SpyOpMatchInOrder`) that need to know the names\n        of temporary filenames up-front.\n\n        Unit test suites that use this must mix in :py:class:`kgb.SpyAgency`.\n\n        Args:\n            count (int):\n                The number of temporary filenames to pre-create.\n\n        Raises:\n            AssertionError:\n                The test suite class did not mix in :py:class:`kgb.SpyAgency`.\n        '
    assert hasattr(self, 'spy_on'), ('%r must mix in kgb.SpyAgency in order to call this method.' % self.__class__)
    tmpfiles = [make_tempfile() for i in range(count)]
    self.spy_on(make_tempfile, op=kgb.SpyOpReturnInOrder(tmpfiles))
    return tmpfiles