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

test_smart_open: close gzip obj after writing #822

Merged
merged 1 commit into from May 8, 2024
Merged

test_smart_open: close gzip obj after writing #822

merged 1 commit into from May 8, 2024

Conversation

ghost
Copy link

@ghost ghost commented May 8, 2024

Motivation

fixes test_smart_open unit tests when run under python 3.12.

https://hydra.nixos.org/build/257823750
log

=========================== short test summary info ============================
FAILED smart_open/tests/test_smart_open.py::SmartOpenHttpTest::test_http_gz - EOFError: Compressed file ended before the end-of-stream marker was reached
FAILED smart_open/tests/test_smart_open.py::SmartOpenHttpTest::test_http_gz_query - EOFError: Compressed file ended before the end-of-stream marker was reached
FAILED smart_open/tests/test_smart_open.py::test_s3_gzip_compress_sanity - EOFError: Compressed file ended before the end-of-stream marker was reached
FAILED smart_open/tests/test_smart_open.py::test_s3_read_explicit[s3://bucket/gzipped-.gz] - EOFError: Compressed file ended before the end-of-stream marker was reached
FAILED smart_open/tests/test_smart_open.py::test_s3_write_explicit[.gz-\x1f\x8b\x08\x087'\x93`\x02\xffkey\x00] - assert b"\x1f\x8b\x0...3\x00\x00\x00" == b"\x1f\x8b\x0...02\xffkey\x00"
FAILED smart_open/tests/test_smart_open.py::test_s3_write_implicit[s3://bucket/key.gz-.gz-\x1f\x8b\x08\x087'\x93`\x02\xffkey\x00] - assert b"\x1f\x8b\x0...3\x00\x00\x00" == b"\x1f\x8b\x0...02\xffkey\x00"
FAILED smart_open/tests/test_smart_open.py::test_s3_disable_compression[s3://bucket/key.gz-.gz-\x1f\x8b\x08\x087'\x93`\x02\xffkey\x00] - assert b"\x1f\x8b\x0...3\x00\x00\x00" == b"\x1f\x8b\x0...02\xffkey\x00"
= 7 failed, 372 passed, 4 skipped, 4 deselected, 4 xfailed, 2 xpassed, 2412 warnings in 93.89s (0:01:33) =

smart_open/tests/test_smart_open.py Outdated Show resolved Hide resolved
fixes tests under python 3.12
@ddelange
Copy link
Contributor

ddelange commented May 8, 2024

does it make sense to add 3.12 to the github test matrix?

@mpenkov
Copy link
Collaborator

mpenkov commented May 8, 2024

@ddelange Yes, let me go do that now

@mpenkov mpenkov merged commit 4acd4fc into piskvorky:develop May 8, 2024
21 checks passed
@mpenkov
Copy link
Collaborator

mpenkov commented May 8, 2024

Thank you @annaleeleaves

@ghost ghost deleted the tests-close-gzip-obj branch May 8, 2024 23:15
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.

3 participants