Skip to content

Fix the dpi related cron job failures#875

Merged
aaronayres35 merged 2 commits into
masterfrom
fix-cron-dpi-failures
Jul 20, 2021
Merged

Fix the dpi related cron job failures#875
aaronayres35 merged 2 commits into
masterfrom
fix-cron-dpi-failures

Conversation

@aaronayres35
Copy link
Copy Markdown
Contributor

@aaronayres35 aaronayres35 commented Jul 19, 2021

There was a recent pillow release which included this change: python-pillow/Pillow#5476
That was causing the cron job to fail with:

======================================================================
FAIL: test_save_dpi (kiva.tests.test_agg_drawing.TestAggDrawing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/kiva/tests/test_agg_drawing.py", line 24, in test_save_dpi
    self.assertEqual(self.save_and_return_dpi(), 144)
AssertionError: 143.99259999999998 != 144

======================================================================
FAIL: test_save_dpi (kiva.tests.test_celiagg_drawing.TestCeliaggDrawing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/kiva/tests/test_celiagg_drawing.py", line 22, in test_save_dpi
    self.assertEqual(self.save_and_return_dpi(), 144)
AssertionError: 143.99259999999998 != 144

----------------------------------------------------------------------

This PR simply adjusts for this by adding an int() call when we get the dpi. Note the above pillow PR explains why this started occurring.

fixes #866

@aaronayres35
Copy link
Copy Markdown
Contributor Author

aaronayres35 commented Jul 19, 2021

I've manually triggered the cron job on this branch to verify this fix: https://github.com/enthought/enable/actions/runs/1045927150

EDIT: ah and it doesn't fix it! int(143.99259999999998) is 143. using round does what we expect.
new run with round: https://github.com/enthought/enable/actions/runs/1046114933

Copy link
Copy Markdown
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aaronayres35 aaronayres35 merged commit 3d469b4 into master Jul 20, 2021
@aaronayres35 aaronayres35 deleted the fix-cron-dpi-failures branch July 20, 2021 12:26
aaronayres35 added a commit that referenced this pull request Jul 20, 2021
* add an int() call to fix test suite failures

* use round not int
aaronayres35 added a commit that referenced this pull request Jul 20, 2021
* Fix the dpi related cron job failures (#875)

* add an int() call to fix test suite failures

* use round not int

* update changelog withh latest fix

* Update CHANGES.txt

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
aaronayres35 added a commit that referenced this pull request Jul 20, 2021
* Fix the dpi related cron job failures (#875)

* add an int() call to fix test suite failures

* use round not int

* update changelog withh latest fix

* Update CHANGES.txt

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
aaronayres35 added a commit that referenced this pull request Jul 20, 2021
* update changelog in advance of 5.2.1 (#874)

* update changelog in advance of 5.2.1

* Update CHANGES.txt

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

* Backport cron job fix (#876)

* Fix the dpi related cron job failures (#875)

* add an int() call to fix test suite failures

* use round not int

* update changelog withh latest fix

* Update CHANGES.txt

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bleeding Edge Cron Job failure

2 participants