Skip to content

Failed

OmeroPy.test.integration.test_thumbnailPerms.TestThumbnailPerms.test12145ShareSettingsRnd[admin-readWrite-request] (from pytest)

Failing for the past 2 builds (Since #412 )
Took 8.2 sec.

Error Message

AttributeError: 'numpy.ndarray' object has no attribute 'tostring'

Stacktrace

self = <test.integration.test_thumbnailPerms.TestThumbnailPerms object at 0x7fc4749b7a90>
method = 'request', perms = 'readWrite', roles = 'admin'

    @pytest.mark.parametrize(
        "method", (
            "saveCurrent", "saveAs",
            "request", "resetDefault",
            "resetDefaultNoSave"))
    @pytest.mark.parametrize(
        "perms", ("readOnly", "readAnnotate", "readWrite"))
    @pytest.mark.parametrize("roles", ("owner", "admin"))
    def test12145ShareSettingsRnd(self, method, perms, roles):
        """
        Rendering settings should be shared when possible.
        Rather than regenerating the min/max per viewer,
        these should be used unless requested otherwise.
        """
        if perms == "readOnly":
            group = self.new_group(perms="rwr---")
            owner = self.new_client(group=group)
            if roles == "owner":
                user = self.new_user(group=group, owner=True)
                other = self.new_client(user=user, group=group)
            elif roles == "admin":
                user = self.new_user(group=group, system=True)
                other = self.new_client(user=user, group=group)
        elif perms == "readAnnotate":
            group = self.new_group(perms="rwra--")
            owner = self.new_client(group=group)
            if roles == "owner":
                user = self.new_user(group=group, owner=True)
                other = self.new_client(user=user, group=group)
            elif roles == "admin":
                user = self.new_user(group=group, system=True)
                other = self.new_client(user=user, group=group)
        elif perms == "readWrite":
            group = self.new_group(perms="rwrw--")
            owner = self.new_client(group=group)
            other = self.new_client(group=group)
    
        # creation generates a first rendering image
>       image = self.create_test_image(session=owner.sf)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

test/integration/test_thumbnailPerms.py:381: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../.venv3/lib64/python3.11/site-packages/omero/testlib/__init__.py:445: in create_test_image
    script_utils.upload_plane(raw_pixel_store, plane_2d,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

raw_pixels_store = 07eb11ab-9b28-48f2-9232-f4dd2b540a4d/14743101-b540-42bb-8dfa-f1508b419617omero.api.RawPixelsStore -t -e 1.1:tcp -h 172.18.0.12 -p 33635 -t 60000
plane = array([[ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15],
       [ 0,  1,  2,  3,  4,  5,  6,  7,  8,  ..., 10, 11, 12, 13, 14, 15],
       [ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15]],
      dtype=int16)
z = 0, c = 0, t = 0

    def upload_plane(raw_pixels_store, plane, z, c, t):
        """
        Upload the plane to the server attaching it to the current z,c,t
        of the already instantiated rawPixelStore.
    
        :param raw_pixels_store store pointing to the data.
        :param plane The data to upload
        :param z The Z-Section of the plane.
        :param c The C-Section of the plane.
        :param t The T-Section of the plane.
        """
        byte_swapped_plane = plane.byteswap()
>       converted_plane = byte_swapped_plane.tostring()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       AttributeError: 'numpy.ndarray' object has no attribute 'tostring'

../../../../.venv3/lib64/python3.11/site-packages/omero/util/script_utils.py:1088: AttributeError