示例#1
0
 def test_set_legend_int(self, legend_mock):
     """set_legend() properly calls legend when specified
     """
     args = MagicMock(savefig="", legend=["3"])
     plot_lib.set_legend(args)
     legend_mock.assert_called_with(loc=3)
示例#2
0
 def test_set_legend_int(self, legend_mock):
     """set_legend() properly calls legend when specified
     """
     args = MagicMock(savefig='', legend=['3'])
     plot_lib.set_legend(args)
     legend_mock.assert_called_with(loc=3)
示例#3
0
 def test_set_legend_no_args(self, legend_mock):
     """set_legend() properly does nothing when nothing specified
     """
     args = MagicMock(savefig="", legend=[])
     plot_lib.set_legend(args)
     self.assertFalse(legend_mock.called)
示例#4
0
 def test_set_legend_no_args(self, legend_mock):
     """set_legend() properly does nothing when nothing specified
     """
     args = MagicMock(savefig='', legend=[])
     plot_lib.set_legend(args)
     self.assertFalse(legend_mock.called)