ruby-vips icon indicating copy to clipboard operation
ruby-vips copied to clipboard

Vips::SourceCustom test failure in Debian

Open lucaskanashiro opened this issue 2 years ago • 3 comments

Describe the bug When running tests of version 2.1.4 in Debian we get the following failure:

  1) Vips::SourceCustom can write an image to a user output stream
     Failure/Error: expect(image.avg).to be_within(0.001).of(109.789)
       expected 109.41407425505706 to be within 0.001 of 109.789

This happens all the time, which makes me think if the range (0.001) is indeed correct.

To Reproduce Steps to reproduce the behavior:

  1. Grab the debian package for ruby-vips version 2.1.4 (latest version)
  2. Try to build it.

I believe if you simple try to run tests in Debian unstable you will get the same failure. Currently the default is ruby 3.1.

Expected behavior All tests pass.

Desktop (please complete the following information):

  • OS: Debian
  • Version: unstable (sid)

lucaskanashiro avatar Dec 15 '22 20:12 lucaskanashiro

Hi @lucaskanashiro, you're right, it fails on current Ubuntu as well, I wonder what changed.

I'll have a look, thanks for the report.

jcupitt avatar Dec 16 '22 10:12 jcupitt

Oooof, it's actually a libvips bug, I've fixed it in 8.13 and in master, so ruby-vips now passes when built against the latest libvips.

ruby-vips will need a workaround when testing with libvips 8.13. I'll try to find one that's not too ugly.

jcupitt avatar Dec 16 '22 11:12 jcupitt

Ugh, not very pretty but git master ruby-vips has a workaround. Would you be able to test? Any suggestions for a less ugly test would be very welcome too.

jcupitt avatar Dec 16 '22 12:12 jcupitt