Skip to content

Commit

Permalink
Fix test skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
aCampello committed Nov 1, 2020
1 parent 3822cf9 commit f1b29cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_detector_named_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

from scrubadub.detectors import NamedEntityDetector
from scrubadub.filth import NameFilth, OrganizationFilth, NamedEntityFilth
import scrubadub

from base import BaseTestCase


Expand All @@ -15,11 +13,13 @@ class NamedEntityTestCase(unittest.TestCase, BaseTestCase):
"""

def setUp(self):
self.detector = NamedEntityDetector()
unsupported_version = (sys.version_info.major, sys.version_info.minor) < (3, 6)
unittest.TestCase.skipTest(
(sys.version_info.major, sys.version_info.minor) < (3, 6),
unsupported_version,
"Named entity detector not supported for python<3.6"
)
if not unsupported_version:
self.detector = NamedEntityDetector()

def _assert_filth_type_and_pos(self, doc_list, beg_end_list, filth_class):
doc_names = [str(x) for x in range(len(doc_list))]
Expand Down

0 comments on commit f1b29cd

Please sign in to comment.