pytest-concurrent
pytest-concurrent copied to clipboard
Tests failing
trafficstars
On 469eebcdb728e2e32f7a9b4eb91bd044ebc90be1 (0.2.2)
============================= test session starts ==============================
platform linux -- Python 3.8.1, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /build/python-pytest-concurrent/src/pytest-concurrent-469eebcdb728e2e32f7a9b4eb91bd044ebc90be1, inifile: setup.cfg
plugins: concurrent-0.2.2
collecting ... collected 6 items
tests/test_basic.py::test_help_message PASSED [ 16%]
tests/test_basic.py::test_ini_setting FAILED [ 33%]
tests/test_groups.py::test_concurrent_group[mthread] PASSED [ 50%]
tests/test_groups.py::test_concurrent_group[mproc] PASSED [ 66%]
tests/test_mproc.py::test_multiprocess PASSED [ 83%]
tests/test_mthread.py::test_multithread PASSED [100%]
=================================== FAILURES ===================================
_______________________________ test_ini_setting _______________________________
testdir = <Testdir local('/tmp/pytest-of-builduser/pytest-0/test_ini_setting0')>
@pytest.mark.skipif(sys.platform == 'win32',
reason="does not run on windows")
def test_ini_setting(testdir):
'''notice that this is not tested for windows'''
concurrent_mode = 'mproc'
concurrent_workers = 100
testdir.makeini("""
[pytest]
concurrent_mode = %s
concurrent_workers = %d
""" % (concurrent_mode, concurrent_workers))
testdir.makepyfile("""
import pytest
@pytest.fixture
def concurrent_mode(request):
return request.config.getini('concurrent_mode')
@pytest.fixture
def concurrent_workers(request):
return request.config.getini('concurrent_workers')
def test_concurrent_mode(concurrent_mode):
assert concurrent_mode == '%s'
def test_concurrent_workers(concurrent_workers):
assert concurrent_workers == '%d'
""" % (concurrent_mode, concurrent_workers))
result = testdir.runpytest('-v')
# fnmatch_lines does an assertion internally
> result.stdout.fnmatch_lines([
'*= 2 passed in * seconds =*'
])
E Failed: nomatch: '*= 2 passed in * seconds =*'
E and: '============================= test session starts =============================='
E and: 'platform linux -- Python 3.8.1, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python'
E and: 'cachedir: .pytest_cache'
E and: 'rootdir: /tmp/pytest-of-builduser/pytest-0/test_ini_setting0, inifile: tox.ini'
E and: 'plugins: concurrent-0.2.2'
E and: 'collecting ... collected 2 items'
E and: ''
E and: '============================== 2 passed in 0.06s ==============================='
E remains unmatched: '*= 2 passed in * seconds =*'
/build/python-pytest-concurrent/src/pytest-concurrent-469eebcdb728e2e32f7a9b4eb91bd044ebc90be1/tests/test_basic.py:52: Failed
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform linux -- Python 3.8.1, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-builduser/pytest-0/test_ini_setting0, inifile: tox.ini
plugins: concurrent-0.2.2
collecting ... collected 2 items
============================== 2 passed in 0.06s ===============================
========================= 1 failed, 5 passed in 27.26s =========================
I created PR #37 to fix this.