You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/08/16 19:16:10 UTC
svn commit: r1514801 - in /incubator/climate/branches/RefactorInput/ocw:
evaluation.py tests/test_evaluation.py
Author: joyce
Date: Fri Aug 16 17:16:10 2013
New Revision: 1514801
URL: http://svn.apache.org/r1514801
Log:
Switch ValueError to TypeError in Evaluation subregion raise
Modified:
incubator/climate/branches/RefactorInput/ocw/evaluation.py
incubator/climate/branches/RefactorInput/ocw/tests/test_evaluation.py
Modified: incubator/climate/branches/RefactorInput/ocw/evaluation.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/evaluation.py?rev=1514801&r1=1514800&r2=1514801&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/evaluation.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/evaluation.py Fri Aug 16 17:16:10 2013
@@ -126,7 +126,7 @@ class Evaluation(object):
"Found invalid subregion information. Expected "
"value to be an instance of Bounds."
)
- raise ValueError(error)
+ raise TypeError(error)
self._subregions = value
def add_dataset(self, target_dataset):
Modified: incubator/climate/branches/RefactorInput/ocw/tests/test_evaluation.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/tests/test_evaluation.py?rev=1514801&r1=1514800&r2=1514801&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/tests/test_evaluation.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/tests/test_evaluation.py Fri Aug 16 17:16:10 2013
@@ -79,7 +79,7 @@ class TestEvaluation(unittest.TestCase):
def test_invalid_subregion_bound(self):
bound = "This is not a bounds object"
- with self.assertRaises(ValueError):
+ with self.assertRaises(TypeError):
self.eval.subregions = [bound]
def test_add_ref_dataset(self):