Skip to content

Commit

Permalink
#39 #35 manylinux pytest rounding fix (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
myselfhimself committed Aug 24, 2020
1 parent e1e931f commit 8342687
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_gmic_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import pathlib
import re
from math import floor

import gmic
import pytest
Expand Down Expand Up @@ -401,7 +400,7 @@ def assert_get_proper_print_regex(w, h, search_str):
assert (
re.compile(
r"size = \({},{},1,1\) \[{} b of floats\](.*)\n(.*)\n(.*)min = 0".format(
floor(w), floor(h), int(floor(w) * floor(h) * FLOAT_SIZE_IN_BYTES)
round(w), round(h), int(round(w) * round(h) * FLOAT_SIZE_IN_BYTES)
),
flags=re.MULTILINE,
).search(search_str)
Expand Down Expand Up @@ -442,8 +441,8 @@ def assert_gmic_image_is_filled_with(gmic_image, w, h, d, s, pixel_value):
def test_gmic_image_generation_and_gmic_multiple_resize_run(capfd, gmic_instance_run):
import struct

w = 60
h = 60
w = 240
h = 240
d = 1
s = 1
command_to_apply = "resize 50%,50%"
Expand Down

0 comments on commit 8342687

Please sign in to comment.