Skip to content

Commit

Permalink
relaxed precision in test for Windows/Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislit committed May 21, 2019
1 parent 942b6df commit 4865a01
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/tokenizer/test_tokenizer__tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ def test__tokenizer(self):
self.assertAlmostEqual(nelson_ssk.count(), 18.66784401)

nelson_log = QSkipgrams(qval=3, scaler=log1p).tokenize('NELSON')
self.assertEqual(
nelson_log.get_counter(),
Counter(
gold_standard = Counter(
{
'$$N': 1.0986122886681096,
'$$E': 0.6931471805599453,
Expand Down Expand Up @@ -182,9 +180,10 @@ def test__tokenizer(self):
'S##': 0.6931471805599453,
'ON#': 1.0986122886681096,
'O##': 0.6931471805599453,
}
),
)
})
test_counter = nelson_log.get_counter()
for key in test_counter:
self.assertAlmostEqual(test_counter[key], gold_standard[key])


if __name__ == '__main__':
Expand Down

0 comments on commit 4865a01

Please sign in to comment.