@@ -345,33 +345,32 @@ def test_non_default_dpi(text):
345345
346346
347347def test_get_rotation_string ():
348- assert mpl .text .get_rotation ('horizontal' ) == 0.
349- assert mpl .text .get_rotation ('vertical' ) == 90.
350- assert mpl .text .get_rotation ('15.' ) == 15.
348+ assert Text (rotation = 'horizontal' ).get_rotation () == 0.
349+ assert Text (rotation = 'vertical' ).get_rotation () == 90.
351350
352351
353352def test_get_rotation_float ():
354353 for i in [15. , 16.70 , 77.4 ]:
355- assert mpl . text . get_rotation (i ) == i
354+ assert Text ( rotation = i ). get_rotation () == i
356355
357356
358357def test_get_rotation_int ():
359358 for i in [67 , 16 , 41 ]:
360- assert mpl . text . get_rotation (i ) == float (i )
359+ assert Text ( rotation = i ). get_rotation () == float (i )
361360
362361
363362def test_get_rotation_raises ():
364363 with pytest .raises (ValueError ):
365- mpl . text . get_rotation ( 'hozirontal' )
364+ Text ( rotation = 'hozirontal' )
366365
367366
368367def test_get_rotation_none ():
369- assert mpl . text . get_rotation (None ) == 0.0
368+ assert Text ( rotation = None ). get_rotation () == 0.0
370369
371370
372371def test_get_rotation_mod360 ():
373372 for i , j in zip ([360. , 377. , 720 + 177.2 ], [0. , 17. , 177.2 ]):
374- assert_almost_equal (mpl . text . get_rotation (i ), j )
373+ assert_almost_equal (Text ( rotation = i ). get_rotation (), j )
375374
376375
377376@pytest .mark .parametrize ("ha" , ["center" , "right" , "left" ])
0 commit comments