Example #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)
Example #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)
Example #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)
Example #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)