Skip to content

Commit

Permalink
fix(tests): Adds rounding to fix different Python versions testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
gugarosa committed Apr 22, 2022
1 parent 46bc098 commit 54c1ab2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/opytimark/markers/test_n_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_deb1():

y = f(x)

assert y == -1.0
assert np.round(y, 1) == -1.0


def test_deb3():
Expand Down
2 changes: 1 addition & 1 deletion tests/opytimark/markers/test_one_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_forrester():

y = f(x)

assert y == -5.9932767166446155
assert np.round(y, 2) == -5.99


def test_gramacy_lee():
Expand Down
14 changes: 7 additions & 7 deletions tests/opytimark/markers/test_two_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_bird():

y = f(x)

assert y == -106.76453674760198
assert np.round(y, 3) == -106.765


def test_bohachevsky1():
Expand Down Expand Up @@ -220,7 +220,7 @@ def test_cross_tray():

y = f(x)

assert y == -2.062611870822739
assert np.round(y, 3) == -2.063


def test_cube():
Expand Down Expand Up @@ -350,7 +350,7 @@ def test_holder_table():

y = f(x)

assert y == -19.208502567767606
assert np.round(y, 3) == -19.209


def test_hosaki():
Expand Down Expand Up @@ -650,7 +650,7 @@ def test_table1():

y = f(x)

assert y == -26.920335555515848
assert np.round(y, 3) == -26.920


def test_table2():
Expand All @@ -660,7 +660,7 @@ def test_table2():

y = f(x)

assert y == -19.20850256788675
assert np.round(y, 3) == -19.209


def test_table3():
Expand All @@ -670,7 +670,7 @@ def test_table3():

y = f(x)

assert y == -24.156815516506533
assert np.round(y, 3) == -24.157


def test_testtube_holder():
Expand All @@ -680,7 +680,7 @@ def test_testtube_holder():

y = f(x)

assert y == -10.872299901558
assert np.round(y, 3) == -10.872


def test_trecani():
Expand Down

0 comments on commit 54c1ab2

Please sign in to comment.