Chromium Code Reviews| Index: appengine/findit/crash/loglinear/test/weight_test.py |
| diff --git a/appengine/findit/crash/loglinear/test/weight_test.py b/appengine/findit/crash/loglinear/test/weight_test.py |
| index c1e882395d8f1b90935bb36c3b353c9df2f9e09d..9e3cb0ca7c703f37ae3123e0f8aeb8d02a71ad3a 100644 |
| --- a/appengine/findit/crash/loglinear/test/weight_test.py |
| +++ b/appengine/findit/crash/loglinear/test/weight_test.py |
| @@ -60,12 +60,12 @@ class MetaWeightTest(unittest.TestCase): |
| MetaFeatureValue('f', {'f1': 2., 'f2': 1.}), 2.) |
| self.assertEqual(MetaFeatureValue('f', {'f1': 0.8, 'f2': 0.4}) * |
| MetaWeight({'f1': Weight(2.), 'f2': Weight(1.)}), 2.) |
| - with self.assertRaisesRegexp(Exception, |
|
stgao
2017/03/14 04:34:33
So you mentioned in the bug "when the trained weig
Sharu Jiang
2017/03/14 05:09:17
No, the flaky test is ``testTrainWeights`` in trai
|
| - ('MetaWeight can only multiply with ' |
| - '``MetaFeatureValue`` ' |
| - 'with the same length')): |
| - dummy_result = MetaWeight({'f1': 0.8, 'f2': 0.4}) * MetaFeatureValue( |
| - 'f', {'f1': 2.}) |
| + |
| + self.assertEqual( |
| + MetaWeight({'f1': Weight(0.8), 'f3': Weight(0.0)}) * |
| + MetaFeatureValue('f', {'f1': Weight(2.), 'f2': Weight(9), |
| + 'f3': Weight(10)}), |
| + 1.6) |
| def testIter(self): |
| """Tests overloading operator ``__iter__``.""" |