From cc8a060975796a9c3a9005468a4c770a68112ce2 Mon Sep 17 00:00:00 2001 From: Kurt Schwehr Date: Thu, 17 Oct 2024 08:46:39 -0700 Subject: [PATCH] imagecollection_test.py: Add `test_count`. PiperOrigin-RevId: 686929368 --- python/ee/tests/imagecollection_test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/ee/tests/imagecollection_test.py b/python/ee/tests/imagecollection_test.py index 69f0e4bd1..90bf7e63e 100644 --- a/python/ee/tests/imagecollection_test.py +++ b/python/ee/tests/imagecollection_test.py @@ -480,6 +480,16 @@ def test_copy_properties(self): result = json.loads(expression.serialize()) self.assertEqual(expect, result) + def test_count(self): + expect = make_expression_graph({ + 'arguments': {'collection': IMAGES_A}, + # Note that this is not ImageCollection.count or collection.count. + 'functionName': 'reduce.count', + }) + expression = ee.ImageCollection('a').count() + result = json.loads(expression.serialize()) + self.assertEqual(expect, result) + def test_distance(self): # Inherited from Collection.distance. features = ee.ImageCollection('a')