Skip to content

PYTHON-5441 - Unskip gridfs download chunk tests #2449

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

Merged
merged 2 commits into from
Jul 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions test/asynchronous/unified_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,15 @@ def maybe_skip_test(self, spec):
self.skipTest("Implement PYTHON-1894")
if "timeoutMS applied to entire download" in spec["description"]:
self.skipTest("PyMongo's open_download_stream does not cap the stream's lifetime")
if any(
x in spec["description"]
for x in [
"First insertOne is never committed",
"Second updateOne is never committed",
"Third updateOne is never committed",
]
):
self.skipTest("Implement PYTHON-4597")

class_name = self.__class__.__name__.lower()
description = spec["description"].lower()
Expand Down Expand Up @@ -672,7 +681,7 @@ def process_error(self, exception, spec):
self.match_evaluator.match_result(expect_result, result)
else:
self.fail(
f"expectResult can only be specified with {BulkWriteError} or {ClientBulkWriteException} exceptions"
f"expectResult can only be specified with {BulkWriteError} or {ClientBulkWriteException} exceptions, got {exception}"
)

return exception
Expand Down Expand Up @@ -982,13 +991,9 @@ async def run_entity_operation(self, spec):
if ignore and isinstance(exc, (PyMongoError,)):
return exc
if expect_error:
if method_name == "_collectionOperation_bulkWrite":
self.skipTest("Skipping test pending PYTHON-4598")
return self.process_error(exc, expect_error)
raise
else:
if method_name == "_collectionOperation_bulkWrite":
self.skipTest("Skipping test pending PYTHON-4598")
if expect_error:
self.fail(f'Excepted error {expect_error} but "{opname}" succeeded: {result}')

Expand Down
15 changes: 10 additions & 5 deletions test/unified_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,15 @@ def maybe_skip_test(self, spec):
self.skipTest("Implement PYTHON-1894")
if "timeoutMS applied to entire download" in spec["description"]:
self.skipTest("PyMongo's open_download_stream does not cap the stream's lifetime")
if any(
x in spec["description"]
for x in [
"First insertOne is never committed",
"Second updateOne is never committed",
"Third updateOne is never committed",
]
):
self.skipTest("Implement PYTHON-4597")

class_name = self.__class__.__name__.lower()
description = spec["description"].lower()
Expand Down Expand Up @@ -671,7 +680,7 @@ def process_error(self, exception, spec):
self.match_evaluator.match_result(expect_result, result)
else:
self.fail(
f"expectResult can only be specified with {BulkWriteError} or {ClientBulkWriteException} exceptions"
f"expectResult can only be specified with {BulkWriteError} or {ClientBulkWriteException} exceptions, got {exception}"
)

return exception
Expand Down Expand Up @@ -973,13 +982,9 @@ def run_entity_operation(self, spec):
if ignore and isinstance(exc, (PyMongoError,)):
return exc
if expect_error:
if method_name == "_collectionOperation_bulkWrite":
self.skipTest("Skipping test pending PYTHON-4598")
return self.process_error(exc, expect_error)
raise
else:
if method_name == "_collectionOperation_bulkWrite":
self.skipTest("Skipping test pending PYTHON-4598")
if expect_error:
self.fail(f'Excepted error {expect_error} but "{opname}" succeeded: {result}')

Expand Down
Loading