-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_hypothesis.py
More file actions
41 lines (29 loc) · 1.13 KB
/
test_hypothesis.py
File metadata and controls
41 lines (29 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# #!/usr/bin/env python
# # -*- coding: utf-8 -*-
# import unittest
# from hypothesis import given, settings
# from hypothesis import strategies
# from stringscore import liquidmetal
# from stringscore import quicksilver
# class LiquidMetalHypothesisTestCase(unittest.TestCase):
# @given(strategies.text(), strategies.text())
# @settings(max_examples=50000)
# def test_score_boundaries(self, string, abbrev):
# try:
# score = liquidmetal.score(string, abbrev)
# self.assertTrue(0.0 <= score <= 1.0)
# except Exception as ex:
# print('{} / {}'.format(repr(string), repr(abbrev)))
# raise ex
# class QuickSilverHypothesisTestCase(unittest.TestCase):
# @given(strategies.text(), strategies.text())
# @settings(max_examples=50000)
# def test_score_boundaries(self, string, abbrev):
# try:
# score = quicksilver.score(string, abbrev)
# self.assertTrue(0.0 <= score <= 1.0)
# except Exception as ex:
# print('{} / {}'.format(string, abbrev))
# raise ex
# if __name__ == '__main__':
# unittest.main()