From 2f263d4d3f11eb4a2b32ace467fd2767c371f4d7 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 29 Dec 2025 09:09:56 -0600 Subject: [PATCH] PYTHON-5680 Fix handling of expectedDocuments in Unified Test Runner (#2665) --- test/asynchronous/unified_format.py | 2 +- test/unified_format.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/asynchronous/unified_format.py b/test/asynchronous/unified_format.py index be2372f22..6ce8f852c 100644 --- a/test/asynchronous/unified_format.py +++ b/test/asynchronous/unified_format.py @@ -1458,7 +1458,7 @@ class UnifiedSpecTestMixinV1(AsyncIntegrationTest): read_concern=ReadConcern(level="local"), ) - if expected_documents: + if expected_documents is not None: sorted_expected_documents = sorted(expected_documents, key=lambda doc: doc["_id"]) actual_documents = await coll.find({}, sort=[("_id", ASCENDING)]).to_list() self.assertListEqual(sorted_expected_documents, actual_documents) diff --git a/test/unified_format.py b/test/unified_format.py index 9e3dc1fed..9aee28725 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -1445,7 +1445,7 @@ class UnifiedSpecTestMixinV1(IntegrationTest): read_concern=ReadConcern(level="local"), ) - if expected_documents: + if expected_documents is not None: sorted_expected_documents = sorted(expected_documents, key=lambda doc: doc["_id"]) actual_documents = coll.find({}, sort=[("_id", ASCENDING)]).to_list() self.assertListEqual(sorted_expected_documents, actual_documents)