Skip to content

Commit 9514a67

Browse files
authored
PYTHON-5441 - Unskip gridfs download chunk tests (#2449)
1 parent 59d94f3 commit 9514a67

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

test/asynchronous/unified_format.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,15 @@ def maybe_skip_test(self, spec):
519519
self.skipTest("Implement PYTHON-1894")
520520
if "timeoutMS applied to entire download" in spec["description"]:
521521
self.skipTest("PyMongo's open_download_stream does not cap the stream's lifetime")
522+
if any(
523+
x in spec["description"]
524+
for x in [
525+
"First insertOne is never committed",
526+
"Second updateOne is never committed",
527+
"Third updateOne is never committed",
528+
]
529+
):
530+
self.skipTest("Implement PYTHON-4597")
522531

523532
class_name = self.__class__.__name__.lower()
524533
description = spec["description"].lower()
@@ -672,7 +681,7 @@ def process_error(self, exception, spec):
672681
self.match_evaluator.match_result(expect_result, result)
673682
else:
674683
self.fail(
675-
f"expectResult can only be specified with {BulkWriteError} or {ClientBulkWriteException} exceptions"
684+
f"expectResult can only be specified with {BulkWriteError} or {ClientBulkWriteException} exceptions, got {exception}"
676685
)
677686

678687
return exception
@@ -982,13 +991,9 @@ async def run_entity_operation(self, spec):
982991
if ignore and isinstance(exc, (PyMongoError,)):
983992
return exc
984993
if expect_error:
985-
if method_name == "_collectionOperation_bulkWrite":
986-
self.skipTest("Skipping test pending PYTHON-4598")
987994
return self.process_error(exc, expect_error)
988995
raise
989996
else:
990-
if method_name == "_collectionOperation_bulkWrite":
991-
self.skipTest("Skipping test pending PYTHON-4598")
992997
if expect_error:
993998
self.fail(f'Excepted error {expect_error} but "{opname}" succeeded: {result}')
994999

test/unified_format.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,15 @@ def maybe_skip_test(self, spec):
518518
self.skipTest("Implement PYTHON-1894")
519519
if "timeoutMS applied to entire download" in spec["description"]:
520520
self.skipTest("PyMongo's open_download_stream does not cap the stream's lifetime")
521+
if any(
522+
x in spec["description"]
523+
for x in [
524+
"First insertOne is never committed",
525+
"Second updateOne is never committed",
526+
"Third updateOne is never committed",
527+
]
528+
):
529+
self.skipTest("Implement PYTHON-4597")
521530

522531
class_name = self.__class__.__name__.lower()
523532
description = spec["description"].lower()
@@ -671,7 +680,7 @@ def process_error(self, exception, spec):
671680
self.match_evaluator.match_result(expect_result, result)
672681
else:
673682
self.fail(
674-
f"expectResult can only be specified with {BulkWriteError} or {ClientBulkWriteException} exceptions"
683+
f"expectResult can only be specified with {BulkWriteError} or {ClientBulkWriteException} exceptions, got {exception}"
675684
)
676685

677686
return exception
@@ -973,13 +982,9 @@ def run_entity_operation(self, spec):
973982
if ignore and isinstance(exc, (PyMongoError,)):
974983
return exc
975984
if expect_error:
976-
if method_name == "_collectionOperation_bulkWrite":
977-
self.skipTest("Skipping test pending PYTHON-4598")
978985
return self.process_error(exc, expect_error)
979986
raise
980987
else:
981-
if method_name == "_collectionOperation_bulkWrite":
982-
self.skipTest("Skipping test pending PYTHON-4598")
983988
if expect_error:
984989
self.fail(f'Excepted error {expect_error} but "{opname}" succeeded: {result}')
985990

0 commit comments

Comments
 (0)