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

unittest-parallel hangs after tests are finished #30

Open
oneumyvakin opened this issue Feb 11, 2025 · 0 comments
Open

unittest-parallel hangs after tests are finished #30

oneumyvakin opened this issue Feb 11, 2025 · 0 comments

Comments

@oneumyvakin
Copy link

Hello,

there is https://github.com/craigahobbs/unittest-parallel (https://pypi.org/project/unittest-parallel/) module using multiprocessing and has a very small code base https://github.com/craigahobbs/unittest-parallel/blob/main/src/unittest_parallel/main.py

Unfortunately geventmp can't helps unittest-parallel to finish it's work with gevent.
Tests are executed successfully but there is a hang after the tests execution.

Here two simple tests files:

tests/# cat test_1.py

import unittest
import logging

class TestCompute1(unittest.TestCase):

    def test_compute_1(self):

        logging.getLogger().warning("test_compute_1 start")

tests/# cat test_1.py

import unittest
import logging

class TestCompute2(unittest.TestCase):

    def test_compute_2(self):
        logging.getLogger().warning("test_compute_2 start")

Here is a Dockerfile:

FROM python:3.12-bullseye

RUN pip install --upgrade pip && \
    python -m pip install pytest && \
    python -m pip install unittest-parallel && \
    python -m pip install geventmp==0.0.9

COPY ./ /tests

# Executed successfully:
RUN python -m unittest_parallel -v --failfast -j 1 -t . -s /tests/

# Hangs forever:
RUN python -m gevent.monkey --module unittest_parallel -v --failfast -j 1 -t . -s /tests/
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

1 participant