|
1 | 1 | import unittest |
| 2 | +import math |
2 | 3 |
|
3 | 4 | from testtools import TestCase |
4 | 5 | from testtools.matchers import * |
@@ -27,12 +28,13 @@ def setUp(self): |
27 | 28 |
|
28 | 29 | def test_table_generator(self): |
29 | 30 | rules = list(RuleGenerator.compute_rules(test_data1)) |
30 | | - self.assertThat(rules, ContainsAll([Rule(31, None, 373, 1, 0.5, "item"), Rule(373, None, 31, 1, 1.0, "item")])) |
31 | | - |
| 31 | + self.assertThat(rules, ContainsAll([Rule(31, None, 373, 1, 0.5*math.log(2), "item"), |
| 32 | + Rule(373, None, 31, 1, 1.0*math.log(2), "item")])) |
32 | 33 |
|
33 | 34 | def test_table_with_multiple_occurance(self): |
34 | 35 | rules = list(RuleGenerator.compute_rules(test_data2)) |
35 | | - self.assertThat(rules, ContainsAll([Rule(31, None, 373, 1, 1.0, "item"), Rule(373, None, 31, 1, 1.0, "item")])) |
| 36 | + self.assertThat(rules, ContainsAll([Rule(31, None, 373, 1, 1.0*math.log(2), "item"), |
| 37 | + Rule(373, None, 31, 1, 1.0*math.log(2), "item")])) |
36 | 38 |
|
37 | 39 | def test_table_with_qualifier_and_references(self): |
38 | 40 | rules = list(RuleGenerator.compute_rules(test_data3)) |
|
0 commit comments