Javi Merino | 7f3c8a6 | 2014-06-13 11:38:58 +0100 | [diff] [blame^] | 1 | #!/usr/bin/python |
| 2 | |
| 3 | import unittest |
| 4 | |
| 5 | import plot_utils |
| 6 | |
| 7 | class TestPlotUtils(unittest.TestCase): |
| 8 | def test_set_plot_size(self): |
| 9 | """Test that plot_utils.set_plot_size() doesn't bomb""" |
| 10 | plot_utils.set_plot_size(None, None) |
| 11 | plot_utils.set_plot_size(height=9, width=None) |
| 12 | plot_utils.set_plot_size(height=None, width=9) |
| 13 | plot_utils.set_plot_size(3, 9) |
| 14 | |
| 15 | def test_normalize_title(self): |
| 16 | """Test normalize_title""" |
| 17 | self.assertEquals(plot_utils.normalize_title("Foo", ""), "Foo") |
| 18 | self.assertEquals(plot_utils.normalize_title("Foo", "Bar"), "Bar - Foo") |
| 19 | |
| 20 | def test_default_plot_settings(self): |
| 21 | """Test that plot_utils.default_plot_settings() doesn't bomb""" |
| 22 | plot_utils.default_plot_settings() |
| 23 | plot_utils.default_plot_settings(title="Foo") |