Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 636274

Summary: dev-python/pexpect-4.2.1 : [TEST± E IOError: reading from stdin while output is captured
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED OBSOLETE    
Severity: normal CC: paolo.pedroni
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/pexpect/pexpect/issues/367
See Also: https://bugs.gentoo.org/show_bug.cgi?id=625854
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
dev-python:pexpect-4.2.1:20171102-112446.log
emerge-history.txt
environment
etc.portage.tbz2
temp.tbz2
tests.tbz2

Description Toralf Förster gentoo-dev 2017-11-02 16:25:54 UTC
    def read(self, *args):
>       raise IOError("reading from stdin while output is captured")
E       IOError: reading from stdin while output is captured

/usr/lib64/python2.7/site-packages/_pytest/capture.py:459: IOError
=============================== warnings summary ===============================

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 13.0-desktop-plasma-systemd_test_20171025-203252

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.4.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python3.6 (fallback)
  [3]   python2.7 (fallback)

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.5.1 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv dev-python/pexpect
[ebuild  N    ] dev-python/pexpect-4.2.1  USE="-doc -examples {-test}" PYTHON_TARGETS="python2_7 python3_4 -pypy -pypy3 -python3_5 -python3_6"
Comment 1 Toralf Förster gentoo-dev 2017-11-02 16:25:57 UTC
Created attachment 501760 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-11-02 16:26:00 UTC
Created attachment 501762 [details]
dev-python:pexpect-4.2.1:20171102-112446.log
Comment 3 Toralf Förster gentoo-dev 2017-11-02 16:26:03 UTC
Created attachment 501764 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-11-02 16:26:06 UTC
Created attachment 501766 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-11-02 16:26:09 UTC
Created attachment 501768 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-11-02 16:26:12 UTC
Created attachment 501770 [details]
temp.tbz2
Comment 7 Toralf Förster gentoo-dev 2017-11-02 16:26:15 UTC
Created attachment 501772 [details]
tests.tbz2
Comment 8 Rolf Eike Beer archtester 2017-11-26 13:41:20 UTC
Same on sparc:

___________________________ FSMTestCase.test_run_fsm ___________________________

self = <tests.test_FSM.FSMTestCase testMethod=test_run_fsm>

    def test_run_fsm(self):
        def _input(prompt):
            return "167 3 2 2 * * * 1 - ="
        orig_input = getattr(builtins, input_name)
        orig_stdout = sys.stdout
        setattr(builtins, input_name, _input)
        sys.stdout = sio = (io.StringIO if PY3 else io.BytesIO)()

        try:
>           FSM.main()

tests/test_FSM.py:24:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pexpect/FSM.py:329: in main
    inputstr = (input if PY3 else raw_input)('> ')  # analysis:ignore
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.capture.DontReadFromInput instance at 0xf6789a80>, args = ()

    def read(self, *args):
>       raise IOError("reading from stdin while output is captured")
E       IOError: reading from stdin while output is captured

/usr/lib/python2.7/site-packages/_pytest/capture.py:444: IOError
_______________________ TestCaseEnv.test_spawn_uses_env ________________________

self = <tests.test_env.TestCaseEnv testMethod=test_spawn_uses_env>

    def test_spawn_uses_env(self):
        " pexpect.spawn uses env argument when running child process "
        script_name = 'spawn_uses_env.sh'
        environ = {'PEXPECT_TEST_KEY': 'pexpect test value'}
        with example_script(script_name, '$PEXPECT_TEST_KEY') as script_dir:
            script = os.path.join(script_dir, script_name)
            child = pexpect.spawn(script, env=environ)
            out = child.readline()
            child.expect(pexpect.EOF)
>       self.assertEqual(child.exitstatus, 0)
E       AssertionError: None != 0

tests/test_env.py:68: AssertionError
----------------------------- Captured stdout call -----------------------------
Comment 9 Paolo Pedroni 2019-10-04 17:26:41 UTC
Same with pexpect-4.6.0
Comment 10 David Denoncin 2020-08-02 23:34:11 UTC
Does this still happen? Version 4.6.0 is stable for both archs.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-31 06:34:17 UTC
Closing bugs for old versions with the new stabilization round.  If you can still reproduce with the newest ~arch version, feel free to reopen.