From 1cb5b6d5aa27179c701fb13809ebec2e9cddea60 Mon Sep 17 00:00:00 2001 From: Sujay S Kumar Date: Wed, 12 Sep 2018 12:35:21 +0530 Subject: [PATCH 1/2] Added test to show failure case of partial_ratio --- test_fuzzywuzzy.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test_fuzzywuzzy.py b/test_fuzzywuzzy.py index 58617b68..20f7fdf4 100644 --- a/test_fuzzywuzzy.py +++ b/test_fuzzywuzzy.py @@ -92,6 +92,10 @@ def setUp(self): self.s10 = 'a{' self.s10a = '{b' + self.s11 = 'thane' + self.s11a = 'nation hospitality honda water thane thane west' + self.s11b = 'nation hospitality honda water thane west' + self.cirque_strings = [ "cirque du soleil - zarkana - las vegas", "cirque du soleil ", @@ -122,6 +126,8 @@ def testCaseInsensitive(self): def testPartialRatio(self): self.assertEqual(fuzz.partial_ratio(self.s1, self.s3), 100) + self.assertEqual(fuzz.partial_ratio(self.s11, self.s11a), 100) + self.assertEqual(fuzz.partial_ratio(self.s11, self.s11b), 100) def testTokenSortRatio(self): self.assertEqual(fuzz.token_sort_ratio(self.s1, self.s1a), 100) From afc5d4a9e76c329420a56a8248c0c98d3610b008 Mon Sep 17 00:00:00 2001 From: Sujay S Kumar Date: Thu, 27 Sep 2018 11:00:56 +0530 Subject: [PATCH 2/2] Configured travis to run test_fuzzywuzzy.py in python 3.6 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dd2207e1..30c7772d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ matrix: - python: "pypy3.5-5.8.0" env: TEST_SUITE="py.test test_fuzzywuzzy.py test_fuzzywuzzy_pytest.py" - python: 3.6 - env: TEST_SUITE="python setup.py check --restructuredtext --strict --metadata" + env: TEST_SUITE="py.test test_fuzzywuzzy.py test_fuzzywuzzy_pytest.py" install: - pip install -U pip setuptools wheel - pip install pytest==3.2.5 pycodestyle docutils Pygments hypothesis