[py-dev] Re: tkinter tests failing after capture changes

Jan Balster jan at balster.info
Sun Jul 31 01:49:03 CEST 2005


holger krekel wrote:
> Hi Jan, 
> 
> it appears that at least on my linux machine two tkinter
> related tests are failing after the recent IO-capturing
> changes (we are now doing capturing on FD-level as well as on
> sys.stdout/stderr level).  I couldn't figure out so far what
> the actual problem is.  Can you have a look? 
> 
> The two failing tests are (i guess you will
> get them as well): 
> 
>     py/test/tkinter/testing/test_capture_out_err.py:16
>     py/test/tkinter/testing/test_backend.py:188 
> 
> cheers & thanks, 
> 
>     holger
> 

Hi Holger,

yes, i get the two failing tests. I think the new IO-capturing doesn't work with
  py.execnet.gateway.
If i run the tests with the --looponfailing option i get this captured output:


- - - - - - - - -  test_capture_out_err.py: recorded stdout - - - - - - - - - -
!'testing/test_capture_out_err.py''[1] ''\n'
- - - - - - - - - -  test_capture_out_err: recorded stdout - - - - - - - - - -
'F'
_______________________________________________________________________________
============= tests finished: 63 passed, 2 failed in 9.63 seconds =============

It looks like "channel data". Do you get the same output?

Jan

PS: Here is a little failing testcase: "channel.send() doesn't work while
capturing stdout and stderr"


Testcase:

import py
def test_channel_send_and_capture():

    gateway = py.execnet.PopenGateway()
    channel = gateway.newchannel()
    gateway.remote_exec(channel = channel, source = '''
    import py
    cap = py.io.OutErrCapture()
    channel.send('sending works')
    cap.reset()
    ''')
    data = channel.receive()
    assert data == 'sending works'
    channel.waitclose(1)
    channel.gateway.exit()



Testoutput:
_____________________________________________________________________________
_______ entrypoint: test_channel_send_and_capture__________ _________________

    def test_channel_send_and_capture():

        gateway = py.execnet.PopenGateway()
        channel = gateway.newchannel()
        gateway.remote_exec(channel = channel, source = '''
        import py
        cap = py.io.OutErrCapture()
        channel.send('sending works')
        cap.reset()
        ''')
>       data = channel.receive()

[.../py/io/test/test_capture.py:150]
_ _  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def receive(self):
        """receives an item that was sent from the other side,
        possibly blocking if there is none.
        Note that exceptions from the other side will be
        reraised as channel.RemoteError exceptions containing
        a textual representation of the remote traceback.
        """
        if self._receiver:
            raise IOError("calling receive() on channel with receiver callback")
        x = self._items.get()
        if x is ENDMARKER:
            self._items.put(x)  # for other receivers
E           raise self._stickyerror
>           EOFError

[.../py/execnet/channel.py:126]









More information about the py-dev mailing list