allow higher version of regex library
This commit is contained in:
2
setup.py
2
setup.py
@@ -15,7 +15,7 @@ setup(name='talon',
|
|||||||
zip_safe=True,
|
zip_safe=True,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"lxml==2.3.3",
|
"lxml==2.3.3",
|
||||||
"regex==0.1.20110315", # handling of .* changes from version 0 to 1
|
"regex>=1",
|
||||||
"html2text",
|
"html2text",
|
||||||
"nose==1.2.1",
|
"nose==1.2.1",
|
||||||
"mock",
|
"mock",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from talon.signature.constants import SIGNATURE_MAX_LINES
|
|||||||
rc = re.compile
|
rc = re.compile
|
||||||
|
|
||||||
RE_EMAIL = rc('@')
|
RE_EMAIL = rc('@')
|
||||||
RE_RELAX_PHONE = rc('.*(\(? ?[\d]{2,3} ?\)?.{,3}){2,}')
|
RE_RELAX_PHONE = rc('(\(? ?[\d]{2,3} ?\)?.{,3}?){2,}')
|
||||||
RE_URL = rc(r'''https?://|www\.[\S]+\.[\S]''')
|
RE_URL = rc(r'''https?://|www\.[\S]+\.[\S]''')
|
||||||
|
|
||||||
# Taken from:
|
# Taken from:
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ VALID_PHONE_NUMBERS = [e.strip() for e in VALID.splitlines() if e.strip()]
|
|||||||
|
|
||||||
def test_match_phone_numbers():
|
def test_match_phone_numbers():
|
||||||
for phone in VALID_PHONE_NUMBERS:
|
for phone in VALID_PHONE_NUMBERS:
|
||||||
ok_(RE_RELAX_PHONE.match(phone), "{} should be matched".format(phone))
|
ok_(RE_RELAX_PHONE.search(phone), "{} should be matched".format(phone))
|
||||||
|
|
||||||
|
|
||||||
def test_match_names():
|
def test_match_names():
|
||||||
|
|||||||
Reference in New Issue
Block a user