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