nathadfield commented on code in PR #67285:
URL: https://github.com/apache/airflow/pull/67285#discussion_r3401641717


##########
airflow-core/tests/unit/assets/test_manager.py:
##########
@@ -670,6 +735,31 @@ def _make_asset_model(
     return model
 
 
+class TestComputeTargetPartitionDate:
+    def test_identity_mapper_passes_source_date_through(self):
+        from airflow.assets.manager import _compute_target_partition_date
+        from airflow.partition_mappers.identity import IdentityMapper
+
+        source_date = timezone.parse("2026-05-20T01:00:00")
+        result = _compute_target_partition_date(
+            mapper=IdentityMapper(),
+            source_partition_date=source_date,
+        )
+        assert result == source_date
+
+    def test_non_identity_mapper_returns_none(self):
+        """Only IdentityMapper carries the source date here; 
temporal/composite mappers
+        are resolved from the key by the scheduler via to_partition_date, so 
this returns None."""
+        from airflow.assets.manager import _compute_target_partition_date
+        from airflow.partition_mappers.temporal import StartOfDayMapper
+
+        result = _compute_target_partition_date(

Review Comment:
   Yep. I've removed it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to