From 2dc00bd0a7da11a08ceae4b9da145c33f61f4630 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 23 Dec 2025 08:32:03 -0600 Subject: [PATCH] PYTHON-5680 Fix handling of expectedDocuments in Unified Test Runner --- 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 be2372f224..6ce8f852cf 100644 --- a/test/asynchronous/unified_format.py +++ b/test/asynchronous/unified_format.py @@ -1458,7 +1458,7 @@ async def verify_outcome(self, spec): 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 9e3dc1fed0..9aee287256 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -1445,7 +1445,7 @@ def verify_outcome(self, spec): 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)