Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fail on Python 3.7 #58

Open
hroncok opened this issue Jun 22, 2018 · 1 comment
Open

Test fail on Python 3.7 #58

hroncok opened this issue Jun 22, 2018 · 1 comment

Comments

@hroncok
Copy link

hroncok commented Jun 22, 2018

[terminado (master)]$ git rev-parse HEAD
7fde385926d36ddc5d5475cee275e41e02bce505
[terminado (master)]$ python3.7 -m venv __venv__
[terminado (master)]$ . __venv__/bin/activate
(__venv__) [terminado (master)]$ pip install tornado ptyprocess pytest
...
(__venv__) [terminado (master)]$ python -m pytest
============================= test session starts ==============================
platform linux -- Python 3.7.0rc1, pytest-3.6.2, py-1.5.3, pluggy-0.6.0
rootdir: /home/churchyard/Dokumenty/RedHat/terminado, inifile:
collected 8 items                                                              

terminado/tests/basic_test.py ......F.                                   [100%]

=================================== FAILURES ===================================
______________________ UniqueTermTests.test_max_terminals ______________________

self = <terminado.tests.basic_test.UniqueTermTests testMethod=test_max_terminals>

    @tornado.testing.gen_test
    def test_max_terminals(self):
        tms = yield self.get_term_clients(['/unique'] * MAX_TERMS)
>       pids = yield self.get_pids(tms)

terminado/tests/basic_test.py:228: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
__venv__/lib64/python3.7/site-packages/tornado/gen.py:1099: in run
    value = future.result()
__venv__/lib64/python3.7/site-packages/tornado/gen.py:1107: in run
    yielded = self.gen.throw(*exc_info)
terminado/tests/basic_test.py:121: in get_pids
    pid = yield tm.get_pid()
__venv__/lib64/python3.7/site-packages/tornado/gen.py:1099: in run
    value = future.result()
__venv__/lib64/python3.7/site-packages/tornado/gen.py:1107: in run
    yielded = self.gen.throw(*exc_info)
terminado/tests/basic_test.py:87: in get_pid
    (stdout, extra) = yield self.read_stdout()
__venv__/lib64/python3.7/site-packages/tornado/gen.py:1099: in run
    value = future.result()
__venv__/lib64/python3.7/site-packages/tornado/gen.py:1113: in run
    yielded = self.gen.send(value)
terminado/tests/basic_test.py:74: in read_stdout
    stdout = "".join([msg[1] for msg in msglist if msg[0] == 'stdout'])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <list_iterator object at 0x7f68fea54128>

>   stdout = "".join([msg[1] for msg in msglist if msg[0] == 'stdout'])
E   TypeError: 'NoneType' object is not subscriptable

terminado/tests/basic_test.py:74: TypeError
------------------------------ Captured log call -------------------------------
autoreload.py              123 WARNING  tornado.autoreload started more than once in the same process
=============================== warnings summary ===============================
terminado/tests/basic_test.py::TestTermClient
  cannot collect test class 'TestTermClient' because it has a __init__ constructor

-- Docs: http://doc.pytest.org/en/latest/warnings.html
=============== 1 failed, 7 passed, 1 warnings in 40.72 seconds ================

Funny enough a second run of tests succeeded:

$ python -m pytest
============================= test session starts ==============================
platform linux -- Python 3.7.0rc1, pytest-3.6.2, py-1.5.3, pluggy-0.6.0
rootdir: /home/churchyard/Dokumenty/RedHat/terminado, inifile:
collected 8 items                                                              

terminado/tests/basic_test.py ........                                   [100%]

=============================== warnings summary ===============================
terminado/tests/basic_test.py::TestTermClient
  cannot collect test class 'TestTermClient' because it has a __init__ constructor

-- Docs: http://doc.pytest.org/en/latest/warnings.html
==================== 8 passed, 1 warnings in 40.39 seconds =====================

And I needed to remove all the pyc files and recreate the venv to reproduce the failure.

@encukou
Copy link

encukou commented Jun 27, 2018

Probably related to #21
I reproduced this when running the tests with pytest (as Terminado's Travis config does), but I could not reproduce when I used Nose (as Terminado's README instructs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants