question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pytest-parallel exit code always 0

See original GitHub issue

Unsure if the issue is specific to me, added the info below to reproduce.

tst.py =

import pytest
def test_tst():
    assert False
etragas$ pytest 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: xdist-1.23.2, profiling-1.3.0, parallel-0.0.5, mock-1.10.0, forked-0.2, cov-2.6.0
collected 1 item

tst.py F                                                                                                                                                 [100%]

=== FAILURES ===

    def test_tst():
>       assert False
E       assert False

tst.py:3: AssertionError
1 failed in 0.08 seconds 

etragas$ echo $?
1

etragas$ pytest tst.py --workers auto
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: xdist-1.23.2, profiling-1.3.0, parallel-0.0.5, mock-1.10.0, forked-0.2, cov-2.6.0
collected 1 item
pytest-parallel: 12 workers (processes), 1 test per worker (thread)
F                                                                                                                                                        [100%]
=== FAILURES ===

    def test_tst():
>       assert False
E       assert False

tst.py:3: AssertionError
1 failed in 0.12 seconds 

HUAWEI_P10-796cab753f8233:diseaseTools etragas$ echo $?
0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
etragas-fathomcommented, Oct 5, 2018

Haha excellent! I just came here to report that session.testsfailed was probably the issue. Thank you for fixing this so quickly 👏

0reactions
kevlenedcommented, Oct 5, 2018

Thanks for reporting this! It should be resolved in 0.0.6, which is on PyPI now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pytest-parallel exit code always 0 · Issue #12 - GitHub
It's not the same, but it means there's a disconnect between how pytest does its reporting and how it decides to exit the...
Read more >
Parallel calculation in SLURM does not always exit after sys ...
exit (0) was not processed by SLURM. I see the running code (R) in the squeue output. At the same time, I'm sure...
Read more >
Exit codes — pytest documentation
Running pytest can result in six different exit codes: Exit code 0. All tests were collected and passed successfully. Exit code 1.
Read more >
Running Pylint - Pylint 2.16.0-dev documentation
Pylint returns bit-encoded exit codes. exit code. meaning. 0. no error.
Read more >
Process Exit Codes in Python
A process can set the exit code automatically or explicitly. For example, if the process exits normally, the exit code will be set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found