Skip to content

test.test_zstd failed due to error type #135166

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

Closed
hongweipeng opened this issue Jun 5, 2025 · 1 comment
Closed

test.test_zstd failed due to error type #135166

hongweipeng opened this issue Jun 5, 2025 · 1 comment
Labels
type-bug An unexpected behavior, bug, or error

Comments

@hongweipeng
Copy link
Contributor

hongweipeng commented Jun 5, 2025

Bug report

Bug description:

weapon@dev:/tmp/tmp.SyXPqDr6vd$ ./python -m test test.test_zstd
Using random seed: 4050720728
0:00:00 load avg: 0.92 Run 1 test sequentially in a single process
0:00:00 load avg: 0.92 [1/1] test.test_zstd
test test.test_zstd failed -- Traceback (most recent call last):
  File "/tmp/tmp.SyXPqDr6vd/Lib/test/test_zstd.py", line 297, in test_compress_parameters
    ZstdCompressor(options={CompressionParameter.nb_workers:4})
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: compression parameter 'nb_workers' received an illegal value 4; the valid range is [0, 0]

0:00:00 load avg: 0.92 [1/1/1] test.test_zstd failed (1 error)

== Tests result: FAILURE ==

1 test failed:
    test.test_zstd

Total duration: 456 ms
Total tests: run=118 skipped=1
Total test files: run=1/1 failed=1
Result: FAILURE

Modules/_zstd/_zstdmodule.c function set_parameter_error :

    /* Error message */
    PyErr_Format(PyExc_ValueError,
        "%s parameter '%s' received an illegal value %d; "
        "the valid range is [%d, %d]",
        type, name, value_v, bounds.lowerBound, bounds.upperBound);

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

@hongweipeng hongweipeng added the type-bug An unexpected behavior, bug, or error label Jun 5, 2025
hongweipeng added a commit to hongweipeng/cpython that referenced this issue Jun 5, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 5, 2025
…nGH-135167)

(cherry picked from commit 1b55e12)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
zooba pushed a commit that referenced this issue Jun 5, 2025
…35167)

gh-135166: Fix exception type expected by test.test_zstd (GH-135167)
(cherry picked from commit 1b55e12)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
@zooba zooba closed this as completed Jun 5, 2025
@zooba
Copy link
Member

zooba commented Jun 5, 2025

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants