From a8a14c08bfd1c833114c6870e30ed5d85c010686 Mon Sep 17 00:00:00 2001 From: azmimoha Date: Sat, 6 Apr 2013 12:58:21 -0400 Subject: [PATCH 1/2] added the unit tests for changing units in the main directory --- matplotlibrc.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matplotlibrc.template b/matplotlibrc.template index 329fba7ee94d..339af4aa46f2 100644 --- a/matplotlibrc.template +++ b/matplotlibrc.template @@ -29,7 +29,7 @@ # You can also deploy your own backend outside of matplotlib by # referring to the module name (which must be in the PYTHONPATH) as # 'module://my_backend' -backend : %(backend)s +backend : Qt4Agg # If you are using the Qt4Agg backend, you can choose here # to use the PyQt4 bindings or the newer PySide bindings to From d52bd9b0c24248342e98474feee7e944ca983950 Mon Sep 17 00:00:00 2001 From: azmimoha Date: Sat, 6 Apr 2013 13:04:54 -0400 Subject: [PATCH 2/2] adding it again --- changing_units_test.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 changing_units_test.py diff --git a/changing_units_test.py b/changing_units_test.py new file mode 100644 index 000000000000..2046c16bc482 --- /dev/null +++ b/changing_units_test.py @@ -0,0 +1,22 @@ +import unittest +import matplotlib.pyplot as plt + +class TestSequenceFunctions(unittest.TestCase): + + def setUp(self): + self.fig1 = plt.figure(figsize=(4,5)) + self.fig2 = plt.figure(figsize=(6,7)) + + def test_figure1(self): + h = self.fig1.get_figheight() + w = self.fig1.get_figwidth() + self.assertEqual((w, h),(4.,5.)) + + def test_figure2(self): + h = self.fig2.get_figheight() + w = self.fig2.get_figwidth() + self.assertEqual((w, h),(6.,7.)) + + +if __name__ == '__main__': + unittest.main()