ghiffaryr / grplot

BSD 3-Clause "New" or "Revised" License
32 stars 2 forks source link

update unit test rot #29

Closed renardelyon closed 1 year ago

renardelyon commented 1 year ago

@ghiffaryr coba di run dlu unit testnya versi matplotlib gw itu set_rotationnya isinya ini

   def set_rotation(self, s):
        """
        Set the rotation of the text.

        Parameters
        ----------
        s : float or {'vertical', 'horizontal'}
            The rotation angle in degrees in mathematically positive direction
            (counterclockwise). 'horizontal' equals 0, 'vertical' equals 90.
        """
        self._rotation = s
        self.stale = True

kalo versi terbaru itu ini

def set_rotation(self, s):
        """
        Set the rotation of the text.
        Parameters
        ----------
        s : float or {'vertical', 'horizontal'}
            The rotation angle in degrees in mathematically positive direction
            (counterclockwise). 'horizontal' equals 0, 'vertical' equals 90.
        """
        if isinstance(s, Real):
            self._rotation = float(s) % 360
        elif cbook._str_equal(s, 'horizontal') or s is None:
            self._rotation = 0.
        elif cbook._str_equal(s, 'vertical'):
            self._rotation = 90.
        else:
            raise ValueError("rotation must be 'vertical', 'horizontal' or "
                             f"a number, not {s}")
        self.stale = True

jadinya yang ditempat gw ada test case yang failed

ghiffaryr commented 1 year ago

hapus aja testcase fungsi test_unknown_rot_argument, terus buat test_x_rot sama test_y_rot ganti aja jadi 71 yon, biar jalan dulu wkwkwk