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

use pytest-xdist to utilize multiple workers for Python tests #6696

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

firewave
Copy link
Collaborator

No description provided.

@firewave firewave marked this pull request as draft August 14, 2024 16:34
@firewave

This comment was marked as resolved.

@firewave
Copy link
Collaborator Author

__________________________ test_color_tty[env0-True] ___________________________
[gw3] darwin -- Python 3.12.5 /usr/local/bin/python3

tmpdir = local('/private/var/folders/3p/1bg9mx4130dgqr_85c65ptwh0000gn/T/pytest-of-runner/pytest-1/popen-gw3/test_color_tty_env0_True_0')
env = {}, color_expected = True

    @pytest.mark.skipif(sys.platform == "win32", reason="TTY not supported in Windows")
    @pytest.mark.parametrize("env,color_expected", [({}, True), ({"NO_COLOR": "1"}, False)])
    def test_color_tty(tmpdir, env, color_expected):
        test_file = os.path.join(tmpdir, 'test.c')
        with open(test_file, 'wt') as f:
            f.write('#error test\nx=1;\n')
        exitcode, _, stderr = cppcheck([test_file], env=env, tty=True)
    
        assert exitcode == 0
>       assert stderr
E       AssertionError: assert ''

other_test.py:119: AssertionError
----------------------------- Captured stdout call -----------------------------
using '/Users/runner/work/cppcheck/cppcheck/cppcheck'
=========================== short test summary info ============================
FAILED other_test.py::test_color_tty[env0-True] - AssertionError: assert ''

I cannot reproduce this on Linux. I assume this might be because the used file is not unique but I cannot be sure. Needs some looking into.

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

Successfully merging this pull request may close these issues.

1 participant