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

Test failures #61

Closed
opoplawski opened this issue Jun 24, 2023 · 0 comments
Closed

Test failures #61

opoplawski opened this issue Jun 24, 2023 · 0 comments

Comments

@opoplawski
Copy link

============================= test session starts ==============================
platform linux -- Python 3.11.4, pytest-7.3.2, pluggy-1.0.0
rootdir: /builddir/build/BUILD/animatplot-0.4.1
collected 32 items

tests/test_animation.py x.                                               [  6%]
tests/test_blocks.py ..............FF..........                          [ 87%]
tests/test_timeline.py ..                                                [ 93%]
tests/test_util.py ..                                                    [100%]

_____________________ TestLineBlock.test_ragged_list_input _____________________

self = <tests.test_blocks.TestLineBlock object at 0x7f8828394150>

    def test_ragged_list_input(self):
        x_data = [np.array([1, 2, 3]), np.array([1, 2, 3, 4])]
        y_data = [np.array([5, 6, 7]), np.array([4, 2, 9, 10])]
    
        with pytest.raises(ValueError) as err:
            line_block = amp.blocks.Line(y_data)
>       assert "Must specify x data explicitly" in str(err)
E       assert 'Must specify x data explicitly' in "<ExceptionInfo ValueError('setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.') tblen=2>"
E        +  where "<ExceptionInfo ValueError('setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.') tblen=2>" = str(<ExceptionInfo ValueError('setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.') tblen=2>)

tests/test_blocks.py:146: AssertionError
___________________ TestLineBlock.test_bad_ragged_list_input ___________________

self = <tests.test_blocks.TestLineBlock object at 0x7f8828395590>

    def test_bad_ragged_list_input(self):
>       x_data = np.array([np.array([1, 2, 3]), np.array([1, 2, 3, 4])])
E       ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.

tests/test_blocks.py:154: ValueError
=========================== short test summary info ============================
FAILED tests/test_blocks.py::TestLineBlock::test_ragged_list_input - assert '...
FAILED tests/test_blocks.py::TestLineBlock::test_bad_ragged_list_input - Valu...

numpy 1.24.3

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

No branches or pull requests

2 participants