77
88from io import BytesIO
99
10- from nose .tools import assert_equal , assert_not_equal
1110import numpy as np
1211
1312from matplotlib .testing .decorators import cleanup , image_comparison
@@ -184,16 +183,16 @@ def test_complete():
184183 plt .close ('all' )
185184
186185 # make doubly sure that there are no figures left
187- assert_equal ( plt ._pylab_helpers .Gcf .figs , {})
186+ assert plt ._pylab_helpers .Gcf .figs == {}
188187
189188 # wind back the fh and load in the figure
190189 result_fh .seek (0 )
191190 fig = pickle .load (result_fh )
192191
193192 # make sure there is now a figure manager
194- assert_not_equal ( plt ._pylab_helpers .Gcf .figs , {})
193+ assert plt ._pylab_helpers .Gcf .figs != {}
195194
196- assert_equal ( fig .get_label (), 'Figure with a label?' )
195+ assert fig .get_label () == 'Figure with a label?'
197196
198197
199198@cleanup
@@ -262,13 +261,12 @@ def test_transform():
262261
263262 obj = pickle .loads (pf )
264263 # Check parent -> child links of TransformWrapper.
265- assert_equal ( obj .wrapper ._child , obj .composite )
264+ assert obj .wrapper ._child == obj .composite
266265 # Check child -> parent links of TransformWrapper.
267- assert_equal (
268- [v () for v in obj .wrapper ._parents .values ()], [obj .composite2 ])
266+ assert [v () for v in obj .wrapper ._parents .values ()] == [obj .composite2 ]
269267 # Check input and output dimensions are set as expected.
270- assert_equal ( obj .wrapper .input_dims , obj .composite .input_dims )
271- assert_equal ( obj .wrapper .output_dims , obj .composite .output_dims )
268+ assert obj .wrapper .input_dims == obj .composite .input_dims
269+ assert obj .wrapper .output_dims == obj .composite .output_dims
272270
273271
274272def test_rrulewrapper ():
@@ -278,8 +276,3 @@ def test_rrulewrapper():
278276 except RecursionError :
279277 print ('rrulewrapper pickling test failed' )
280278 raise
281-
282-
283- if __name__ == '__main__' :
284- import nose
285- nose .runmodule (argv = ['-s' ])
0 commit comments