You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/03/20 18:47:55 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #7777: [AIRFLOW-Date_range compatible with schedule_interval]

mik-laj commented on a change in pull request #7777: [AIRFLOW-Date_range compatible with schedule_interval]
URL: https://github.com/apache/airflow/pull/7777#discussion_r395829059
 
 

 ##########
 File path: tests/utils/test_dates.py
 ##########
 @@ -94,3 +94,12 @@ def test_negative_num_given(self):
 
             for i in range(num):
                 self.assertTrue(timezone.is_localized(result[i]))
+
+    def test_delta_cron_presets(self):
+        num = 2
+        for delta in dates.cron_presets:
+            result = dates.date_range(datetime(2016, 1, 1), num=num, delta=delta)
+               self.assertEqual(len(result), num)
 
 Review comment:
   Can you make it more descriptive? You don't have to test all cases. One is enough if it is tested thoroughly.
   https://testing.googleblog.com/2019/12/testing-on-toilet-tests-too-dry-make.html

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services