Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] tests: Fix test errors when running with numpy 1.13.0 #2396

Merged
merged 1 commit into from
Jun 12, 2017

Conversation

ales-erjavec
Copy link
Contributor

Issue

3 test failures when running with numpy 1.13.0

======================================================================
FAIL: test_init_inst (Orange.tests.test_instance.TestInstance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Miniconda35\conda-bld\orange3_1497021380284\_t_env\lib\site-packages\Orange\tests\test_instance.py", line 170, in test_init_inst
    dtype=object))
  File "C:\Miniconda35\conda-bld\orange3_1497021380284\_t_env\lib\site-packages\numpy\testing\utils.py", line 854, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "C:\Miniconda35\conda-bld\orange3_1497021380284\_t_env\lib\site-packages\numpy\testing\utils.py", line 778, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal
(mismatch 33.33333333333333%)
 x: array([0, nan, 42.0], dtype=object)
 y: array([0, nan, 42], dtype=object)
======================================================================
FAIL: test_init_xym_no_data (Orange.tests.test_instance.TestInstance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Miniconda35\conda-bld\orange3_1497021380284\_t_env\lib\site-packages\Orange\tests\test_instance.py", line 82, in test_init_xym_no_data
    dtype=object))
  File "C:\Miniconda35\conda-bld\orange3_1497021380284\_t_env\lib\site-packages\numpy\testing\utils.py", line 854, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "C:\Miniconda35\conda-bld\orange3_1497021380284\_t_env\lib\site-packages\numpy\testing\utils.py", line 778, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal
(mismatch 66.66666666666666%)
 x: array([nan, nan, ''], dtype=object)
 y: array([nan, nan, ''], dtype=object)
======================================================================
FAIL: test_reprable (Orange.tests.test_util.TestUtil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Miniconda35\conda-bld\orange3_1497021380284\_t_env\lib\site-packages\Orange\tests\test_util.py", line 50, in test_reprable
    "ReplaceUnknownsRandom("
AssertionError: "Repl[62 chars]_of_decimals=3), distribution=Continuous([[ 0.],      [ 0.]]))" != "Repl[62 chars]_of_decimals=3), distribution=Continuous([[ 0.], [ 0.]]))"
- ReplaceUnknownsRandom(variable=ContinuousVariable(name='x', number_of_decimals=3), distribution=Continuous([[ 0.],      [ 0.]]))
?                                                                                                                    -----
+ ReplaceUnknownsRandom(variable=ContinuousVariable(name='x', number_of_decimals=3), distribution=Continuous([[ 0.], [ 0.]]))
Description of changes
  • Remove use of assert_array_equal for object arrays
  • Compare the Reprable output ignoring whitespace.
Includes
  • Code changes
  • Tests
  • Documentation

* Remove use of `assert_array_equal` for object arrays
* Compare the `Reprable` output ignoring whitespace.
@kernc kernc merged commit b9f65fe into biolab:master Jun 12, 2017
@ales-erjavec ales-erjavec deleted the numpy-1.13.0 branch June 13, 2017 08:20
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.

2 participants