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

pypy/interpreter/test/test_zpy.py::test_scripts

def test_scripts():
        tmpfilepath = str(udir.join("test_py_script.py"))
        tmpfile = file( tmpfilepath, "w" )
        tmpfile.write(SCRIPT_1)
        tmpfile.close()
    
        # test 1 : no arguments
        output = run(sys.executable, pypypath, '-S', tmpfilepath)
        assert output.splitlines()[-1] == str([tmpfilepath])
    
        # test 2 : some arguments after
        output = run(sys.executable, pypypath, '-S', tmpfilepath, "hello")
        assert output.splitlines()[-1] == str([tmpfilepath,'hello'])
    
        # test 3 : additionnal pypy parameters
        output = run(sys.executable, pypypath, '-S', "-O", tmpfilepath, "hello")
>       assert output.splitlines()[-1] == str([tmpfilepath,'hello'])
E       IndexError: list index out of range

interpreter\test\test_zpy.py:81: IndexError
---------- Captured stderr call ----------
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
Traceback (most recent call last):
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\bin\pyinteractive.py", line 205, in <module>
    sys.exit(main_(sys.argv))
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\bin\pyinteractive.py", line 101, in main_
    space.appexec([], """():
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1479, in appexec
    return self.call_args(w_func, args)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\objspace\descroperation.py", line 186, in call_args
    return w_obj.call_args(args)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 68, in call_args
    w_res = self.getcode().funcrun(self, args)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pycode.py", line 223, in funcrun
    return frame.run()
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 253, in run
    return self.execute_frame()
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 290, in execute_frame
    raise self._convert_unexpected_exception(e)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 943, in _convert_unexpected_exception
    operr = error.get_converted_unexpected_exception(self.space, e)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 286, in execute_frame
    executioncontext)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 64, in dispatch
    next_instr = self.handle_bytecode(co_code, next_instr, ec)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 71, in handle_bytecode
    next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 422, in dispatch_bytecode
    self.STORE_ATTR(oparg, next_instr)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 898, in STORE_ATTR
    STORE_ATTR_caching(self.getcode(), w_obj, nameindex, w_newvalue)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\objspace\std\mapdict.py", line 1514, in STORE_ATTR_caching
    return STORE_ATTR_slowpath(pycode, w_obj, nameindex, map, w_value, entry)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\objspace\std\mapdict.py", line 1580, in STORE_ATTR_slowpath
    space.setattr(w_obj, w_name, w_value)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\objspace\std\objspace.py", line 685, in setattr
    if w_obj.setdictvalue(space, name, w_value):
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 53, in setdictvalue
    w_dict = self.getdict(space)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\mixedmodule.py", line 127, in getdict
    w_value = self.get(name)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\mixedmodule.py", line 81, in get
    w_value = self.getdictvalue(space, name)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\sys\moduledef.py", line 145, in getdictvalue
    value = MixedModule.getdictvalue(self, space, attr)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\mixedmodule.py", line 93, in getdictvalue
    return self._load_lazily(space, name)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\mixedmodule.py", line 103, in _load_lazily
    w_value = loader(space)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\mixedmodule.py", line 176, in ifileloader
    value = eval(spec, d)
  File "<string>", line 1, in <module>
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\sys\state.py", line 57, in getio
    return space.fromcache(IOState)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rlib\cache.py", line 51, in getorbuild
    result = self._build(key)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 402, in _build
    return callable(self.space)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\sys\state.py", line 40, in __init__
    w_stdin.file_fdopen(0, "r", 1)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_file\interp_file.py", line 329, in file_fdopen
    self.direct_fdopen(fd, mode, buffering)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_file\interp_file.py", line 165, in direct_fdopen
    signal_checker(self.space))
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rlib\streamio.py", line 115, in fdopen_as_stream
    _setfd_binary(fd)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rlib\streamio.py", line 212, in _setfd_binary
    with rposix.SuppressIPH():
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rlib\rposix.py", line 259, in __enter__
    self.invalid_param_hndlr = c_enter_suppress_iph()
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 321, in wrapper
    res = call_external_function(*real_args)
  File "<84-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py:217>", line 13, in call_external_function
    res = funcptr()
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\lltype.py", line 1384, in __call__
    return callb(*args)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\ll2ctypes.py", line 1339, in __call__
    self.natural_arity)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\ll2ctypes.py", line 1236, in get_ctypes_callable
    symbolic=True)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\tool\cbuild.py", line 345, in compile_shared_lib
    standalone=False))
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\__init__.py", line 58, in compile
    return self._finish_linking(ofiles, eci, outputfilename, standalone)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\__init__.py", line 235, in _finish_linking
    return self._link(cc_link, ofiles, largs, standalone, exe_name)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\windows.py", line 303, in _link
    self._execute_c_compiler(self.link, args, exe_name)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\__init__.py", line 143, in _execute_c_compiler
    self._handle_error(returncode, stdout, stderr, outname)
  File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\windows.py", line 319, in _handle_error
    raise CompilationError(stdout, stderr)
CompilationError: CompilationError(out="""
	""")
builder: own-win-x86-64 build #2348+
test: pypy/interpreter/test/test_zpy.py::test_scripts