| Index: appengine/findit/crash/loglinear/test/feature_test.py
|
| diff --git a/appengine/findit/crash/loglinear/test/feature_test.py b/appengine/findit/crash/loglinear/test/feature_test.py
|
| index 6c37bfaf34e4c5a5852eaf4a137252d0184757e8..75536e9e49c2273c63af664968e74f8749fb6b18 100644
|
| --- a/appengine/findit/crash/loglinear/test/feature_test.py
|
| +++ b/appengine/findit/crash/loglinear/test/feature_test.py
|
| @@ -5,6 +5,7 @@
|
| import unittest
|
|
|
| from crash.loglinear import feature
|
| +from crash.loglinear.test.loglinear_testcase import LoglinearTestCase
|
| import libs.math.logarithms as lmath
|
|
|
| _MAXIMUM = 50.
|
| @@ -38,3 +39,13 @@ class ChangelistFeatureTest(unittest.TestCase):
|
| def testLogLinearlyScaledIsOverMax(self):
|
| """Test that ``LogLinearlyScaled`` takes values over the max to log(0)."""
|
| self.assertEqual(lmath.LOG_ZERO, feature.LogLinearlyScaled(42., 10.))
|
| +
|
| +
|
| +class FeatureFunctionTest(LoglinearTestCase):
|
| +
|
| + def testFeatureFunction(self):
|
| + """Test that ``FeatureFunction`` obeys the equality its docstring says."""
|
| + for x in self._X:
|
| + for y in self._Y(x):
|
| + for f in self._feature_list:
|
| + self.assertEqual(f(x)(y), self._feature_function(x)(y)[f.name])
|
|
|