Code Monkey home page Code Monkey logo

Comments (5)

kevlened avatar kevlened commented on May 28, 2024

I think the problem is the way __add__ is implemented. This happens if you get more than one failure?

from pytest-parallel.

etragas-fathom avatar etragas-fathom commented on May 28, 2024

If you set 3 tests that fail and 2 workers it always fails.

from pytest-parallel.

etragas-fathom avatar etragas-fathom commented on May 28, 2024

tst.py:

import pytest
def test_tst():
    assert False

def test_second():
    assert False

def test_third():
    assert False

from pytest-parallel.

etragas-fathom avatar etragas-fathom commented on May 28, 2024
HUAWEI_P10-796cab753f8233:pytest-parallel etragas$ python3 -m pytest --workers 2 ../tst.py
====================================================================== test session starts ======================================================================
platform darwin -- Python 3.6.6, pytest-3.8.1, py-1.6.0, pluggy-0.7.1
rootdir: /Users/etragas/diseaseTools, inifile: pytest.ini
plugins: parallel-0.0.6, xdist-1.23.2, profiling-1.3.0, mock-1.10.0, forked-0.2, cov-2.6.0
collected 3 items
pytest-parallel: 2 workers (processes), 1 test per worker (thread)
FFException in thread Thread-1:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/Users/etragas/diseaseTools/pytest-parallel/pytest_parallel/__init__.py", line 80, in run
    run_test(self.session, item, None)
  File "/Users/etragas/diseaseTools/pytest-parallel/pytest_parallel/__init__.py", line 50, in run_test
    item.ihook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/hooks.py", line 258, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
    firstresult=hook.spec_opts.get('firstresult'),
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
    return outcome.get_result()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
    res = hook_impl.function(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/runner.py", line 66, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/runner.py", line 81, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/runner.py", line 165, in call_and_report
    hook.pytest_runtest_logreport(report=report)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/hooks.py", line 258, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
    firstresult=hook.spec_opts.get('firstresult'),
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
    return outcome.get_result()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
    res = hook_impl.function(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/main.py", line 402, in pytest_runtest_logreport
    self.testsfailed += 1
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int'

from pytest-parallel.

kevlened avatar kevlened commented on May 28, 2024

This should be resolved in 0.0.8

from pytest-parallel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.