Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/objspace/std/test/apptest_complexobject.py::test_file

def test_file():
        import os
>       import tempfile

objspace\std\test\apptest_complexobject.py:430: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    """Temporary files.
    
    This module provides generic, low- and high-level interfaces for
    creating temporary files and directories.  All of the interfaces
    provided by this module can be used without fear of race conditions
    except for 'mktemp'.  'mktemp' is subject to race conditions and
    should not be used; it is provided for backward compatibility only.
    
    The default path names are returned as str.  If you supply bytes as
    input, all return values will be in bytes.  Ex:
    
        >>> tempfile.mkstemp()
        (4, '/tmp/tmptpu9nin8')
        >>> tempfile.mkdtemp(suffix=b'')
        b'/tmp/tmppbi8f0hy'
    
    This module also provides some data items to the user:
    
      TMP_MAX  - maximum number of names that will be tried before
                 giving up.
      tempdir  - If this is set to a string before the first use of
                 any routine from this module, it will be considered as
                 another candidate location to store temporary files.
    """
    
    __all__ = [
        "NamedTemporaryFile", "TemporaryFile", # high level safe interfaces
        "SpooledTemporaryFile", "TemporaryDirectory",
        "mkstemp", "mkdtemp",                  # low level safe interfaces
        "mktemp",                              # deprecated unsafe interface
        "TMP_MAX", "gettempprefix",            # constants
        "tempdir", "gettempdir",
        "gettempprefixb", "gettempdirb",
       ]
    
    
    # Imports.
    
    import functools as _functools
    import warnings as _warnings
    import io as _io
    import os as _os
>   import shutil as _shutil

..\lib-python\3\tempfile.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    """Utility functions for copying and archiving files and directory trees.
    
    XXX The functions here don't copy the resource fork or other metadata on Mac.
    
    """
    
    import os
    import sys
    import stat
    import fnmatch
    import collections
    import errno
    import warnings
    
    try:
        import zlib
        del zlib
        _ZLIB_SUPPORTED = True
    except ImportError:
        _ZLIB_SUPPORTED = False
    
    try:
        import bz2
        del bz2
        _BZ2_SUPPORTED = True
    except ImportError:
        _BZ2_SUPPORTED = False
    
    try:
        import lzma
        del lzma
        _LZMA_SUPPORTED = True
    except ImportError:
        _LZMA_SUPPORTED = False
    
    _WINDOWS = os.name == 'nt'
    posix = nt = None
    if os.name == 'posix':
        import posix
    elif _WINDOWS:
        import nt
    
    if sys.platform == 'win32':
>       import _winapi

..\lib-python\3\shutil.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    """
    Support routines for subprocess and multiprocess module.
    Currently, this extension module is only required when using the
    modules on Windows.
    """
    
    import sys
    
    if sys.platform != 'win32':
        raise ModuleNotFoundError("The '_winapi' module is only available on Windows", name="_winapi")
    
    # Declare external Win32 functions
    
    if sys.maxsize > 2 ** 31:
>       from _pypy_winbase_cffi64 import ffi as _ffi

..\lib_pypy\_winapi.py:15: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    # auto-generated file
>   import _cffi_backend
E   (application-level) ModuleNotFoundError: No module named '_cffi_backend'

..\lib_pypy\_pypy_winbase_cffi64.py:2: ModuleNotFoundError
builder: own-win-x86-64 build #2303+
test: pypy/objspace/std/test/apptest_complexobject.py::test_file