File tree 1 file changed +14
-1
lines changed 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -4112,7 +4112,6 @@ def test_violin_point_mass():
4112
4112
plt .violinplot (np .array ([0 , 0 ]))
4113
4113
4114
4114
4115
-
4116
4115
@cleanup
4117
4116
def test_axisbg_warning ():
4118
4117
fig = plt .figure ()
@@ -4133,6 +4132,20 @@ def test_dash_offset():
4133
4132
plt .show ()
4134
4133
4135
4134
4135
+ @cleanup
4136
+ def test_title_location_roundtrip ():
4137
+ fig , ax = plt .subplots ()
4138
+ ax .set_title ('aardvark' )
4139
+ ax .set_title ('left' , loc = 'left' )
4140
+ ax .set_title ('right' , loc = 'right' )
4141
+
4142
+ assert_equal ('left' , ax .get_title (loc = 'left' ))
4143
+ assert_equal ('right' , ax .get_title (loc = 'right' ))
4144
+ assert_equal ('aardvark' , ax .get_title ())
4145
+
4146
+ assert_raises (ValueError , ax .get_title , loc = 'foo' )
4147
+ assert_raises (ValueError , ax .set_title , 'fail' , loc = 'foo' )
4148
+
4136
4149
4137
4150
if __name__ == '__main__' :
4138
4151
import nose
You can’t perform that action at this time.
0 commit comments