airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlo...@apache.org
Subject [1/4] incubator-airflow git commit: [AIRFLOW-301] Fix broken unit test
Date Thu, 30 Jun 2016 23:42:47 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master 9f49f1285 -> 0a94cae4b


[AIRFLOW-301] Fix broken unit test

This unit tests always fails on the last day of the month, since it
tries to access a nonexistent day (like June 31st).


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/f49e238b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/f49e238b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/f49e238b

Branch: refs/heads/master
Commit: f49e238b72c1701df8ad88a0be232b6619f03edb
Parents: efdbbb5
Author: jlowin <jlowin@users.noreply.github.com>
Authored: Thu Jun 30 17:43:20 2016 -0400
Committer: jlowin <jlowin@users.noreply.github.com>
Committed: Thu Jun 30 18:34:16 2016 -0400

----------------------------------------------------------------------
 tests/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/f49e238b/tests/models.py
----------------------------------------------------------------------
diff --git a/tests/models.py b/tests/models.py
index e4f5aa8..3549e8f 100644
--- a/tests/models.py
+++ b/tests/models.py
@@ -557,7 +557,7 @@ class TaskInstanceTest(unittest.TestCase):
         ti.xcom_push(key=key, value=value)
         self.assertEqual(ti.xcom_pull(task_ids='test_xcom', key=key), value)
         ti.run()
-        exec_date = exec_date.replace(day=exec_date.day + 1)
+        exec_date += datetime.timedelta(days=1)
         ti = TI(
             task=task, execution_date=exec_date)
         ti.run()


Mime
View raw message