pixelate_image_test passing on local machine but failing when making pull requests. #93
-
Hi. I am having an issue passing the pixelate_image_test when I creat a pull request, but the same test passes on local machine even after fresh git clone. For the pixelate_image_test I have a test png image and a txt file that is string equivalent of the image(saved the drawer.ToString() into a txt file). My test is to load the test png image, pixelate it and draw it into a fixed size drawer(same drawer size when creating the string version of image). Then drawers.ToString() content is checked against the string read from the test txt file. This test passes when I run the tests locally but always fails in pull requests. Here is the link to my PR and the test results. What could be causing this problem? I have changed my test data and tried several times but the same issue happens. Thanks for the amazing content ❤️ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @ariyapour it's a bit hard to say what exactly goes wrong here. Considering that there are issues that happen only on the CI and looking at the code of your test they might have something to do with how you read the image and the locale of your system. The good news is that you probably don't need to use the drawer for this particular test, right? Why not create a simple test that loads the existing tiny test file and pixelates it to a selected size? Then you can compare the result to what you expect pixel-for-pixel without involving the drawer. |
Beta Was this translation helpful? Give feedback.
Hey @ariyapour it's a bit hard to say what exactly goes wrong here. Considering that there are issues that happen only on the CI and looking at the code of your test they might have something to do with how you read the image and the locale of your system.
The good news is that you probably don't need to use the drawer for this particular test, right? Why not create a simple test that loads the existing tiny test file and pixelates it to a selected size? Then you can compare the result to what you expect pixel-for-pixel without involving the drawer.