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

pypy/interpreter/test/test_app_main.py::TestNonInteractive::()::test_q_flag

self = <pypy.interpreter.test.test_app_main.TestNonInteractive instance at 0x000000001b3f6d20>

    def test_q_flag(self):
        data = self.run('-iq', senddata='6*7\nraise SystemExit\n',
>                       expect_prompt=True, expect_banner=False)

interpreter/test/test_app_main.py:978: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
interpreter/test/test_app_main.py:810: in run
    data, status = self.run_with_status_code(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.interpreter.test.test_app_main.TestNonInteractive instance at 0x000000001b3f6d20>
cmdline = '/usr/local/bin/python3.12  "/buildbot/slave/own-linux-aarch64/build/pypy/interpreter/app_main.py"  -iq'
senddata = '6*7\nraise SystemExit\n', expect_prompt = True
expect_banner = False, python_flags = '', env = None

    def run_with_status_code(self, cmdline, senddata='', expect_prompt=False,
            expect_banner=False, python_flags='', env=None):
        if os.name == 'nt':
            try:
                import __pypy__
            except:
                py.test.skip('app_main cannot run on non-pypy for windows')
        cmdline = '%s %s "%s" %s %s' % (get_python3(), python_flags,
                                     app_main, python_flags, cmdline)
        print('POPEN:', cmdline)
        process = subprocess.Popen(
            cmdline,
            stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
            shell=True, env=env,
            universal_newlines=True
        )
        child_in, child_out_err = process.stdin, process.stdout
        child_in.write(senddata)
        child_in.close()
        data = child_out_err.read()
        child_out_err.close()
        process.wait()
        assert (banner in data) == expect_banner   # no banner unless expected
>       assert ('>>>> ' in data) == expect_prompt   # no prompt unless expected
E       assert '>>>> ' in 'Traceback (most recent call last):\n  File "/buildbot/slave/own-linux-aarch64/build/pypy/interpreter/app_main.py", li...dtuple\n    exec(code, namespace)\n  File "<string>", line 1, in <module>\nNameError: name \'object\' is not defined\n' == True

interpreter/test/test_app_main.py:805: AssertionError
---------- Captured stdout call ----------
POPEN: /usr/local/bin/python3.12  "/buildbot/slave/own-linux-aarch64/build/pypy/interpreter/app_main.py"  -iq
builder: own-linux-aarch64 build #2901+
test: pypy/interpreter/test/test_app_main.py::TestNonInteractive::()::test_q_flag