formencode/tests/test_email.py | 4 ++++ formencode/validators.py | 8 ++++---- setup.cfg | 2 +- setup.py | 2 -- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/formencode/tests/test_email.py b/formencode/tests/test_email.py index f79aea8..044c721 100644 --- a/formencode/tests/test_email.py +++ b/formencode/tests/test_email.py @@ -2,6 +2,7 @@ from __future__ import absolute_import from __future__ import unicode_literals +import os import unittest from formencode import Invalid @@ -70,6 +71,9 @@ class TestEmail(unittest.TestCase): self.assertEqual(self.validate(email), expected) +@unittest.skipIf( + os.environ.get("NO_INTERNET") is not None, "Requires Internet" +) class TestUnicodeEmailWithResolveDomain(unittest.TestCase): def setUp(self): diff --git a/formencode/validators.py b/formencode/validators.py index 1122287..391b87c 100644 --- a/formencode/validators.py +++ b/formencode/validators.py @@ -1295,16 +1295,16 @@ class Email(FancyValidator): >>> e = Email(resolve_domain=True) >>> e.resolve_domain True - >>> e.to_python('doesnotexist@colorstudy.com') + >>> e.to_python('doesnotexist@colorstudy.com') # doctest: +SKIP 'doesnotexist@colorstudy.com' - >>> e.to_python('test@nyu.edu') + >>> e.to_python('test@nyu.edu') # doctest: +SKIP 'test@nyu.edu' >>> # NOTE: If you do not have dnspython installed this example won't work: >>> e.to_python('test@thisdomaindoesnotexistithinkforsure.com') Traceback (most recent call last): ... Invalid: The domain of the email address does not exist (the portion after the @: thisdomaindoesnotexistithinkforsure.com) - >>> e.to_python('test@google.com') + >>> e.to_python('test@google.com') # doctest: +SKIP 'test@google.com' >>> e = Email(not_empty=False) >>> e.to_python('') @@ -1434,7 +1434,7 @@ class URL(FancyValidator): ... Invalid: That is not a valid URL >>> u = URL(add_http=False, check_exists=True) - >>> u.to_python('http://google.com') + >>> u.to_python('http://google.com') # doctest: +SKIP 'http://google.com' >>> u.to_python('google.com') Traceback (most recent call last): diff --git a/setup.cfg b/setup.cfg index d757f58..b8c5584 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,4 +32,4 @@ max_line_length=100 max_line_length=100 [metadata] -license_files = LICENSE.txt +license_file = LICENSE.txt diff --git a/setup.py b/setup.py index 99ae469..65ec7c3 100755 --- a/setup.py +++ b/setup.py @@ -49,11 +49,9 @@ setup(name='FormEncode', author_email='ianb@colorstudy.com', url='http://formencode.org', license='MIT', - data_files = [("", ["LICENSE.txt"])], zip_safe=False, packages=find_packages(), include_package_data=True, - package_data={'formencode': ['../docs/*.txt']}, test_suite='formencode.tests', install_requires=['six'], tests_require=tests_require,