Beispiel #1
0
 def test_set_plot_limits(self):
     """set_limits() properly sets limits
     """
     args = MagicMock(savefig="", xlim=[-2, 2], ylim=[-3, 3])
     plot_lib.set_limits(args)
     self.assertEqual(pl.gca().get_xlim(), (-2.0, 2.0))
     self.assertEqual(pl.gca().get_ylim(), (-3.0, 3.0))
Beispiel #2
0
 def test_set_plot_limits(self):
     """set_limits() properly sets limits
     """
     args = MagicMock(savefig='', xlim=[-2, 2], ylim=[-3, 3])
     plot_lib.set_limits(args)
     self.assertEqual(pl.gca().get_xlim(), (-2.0, 2.0))
     self.assertEqual(pl.gca().get_ylim(), (-3.0, 3.0))
Beispiel #3
0
 def test_set_plot_limits_no_args(self):
     """set_limits() properly does nothing when nothing specified
     """
     args = MagicMock(savefig="", xlim=[], ylim=[])
     plot_lib.set_limits(args)
     self.assertEqual(pl.gca().get_xlim(), (0.0, 9.0))
     self.assertEqual(pl.gca().get_ylim(), (0.0, 9.0))
Beispiel #4
0
 def test_set_plot_limits_no_args(self):
     """set_limits() properly does nothing when nothing specified
     """
     args = MagicMock(savefig='', xlim=[], ylim=[])
     plot_lib.set_limits(args)
     self.assertEqual(pl.gca().get_xlim(), (0.0, 9.0))
     self.assertEqual(pl.gca().get_ylim(), (0.0, 9.0))