On Wed, Feb 12, 2014 at 01:17:15PM +0100, Matthias Klose wrote: > python-formencode tries to download files during the test target and fails to > build without network access. It makes DNS queries instead of downloading files, but that doesn't make much difference.
Here is a patch that removes doctests that fail but I'm not sure if this
is a right way to fix this:
--- formencode/validators.py.orig 2012-12-17 23:21:26.000000000 +0600
+++ formencode/validators.py 2014-02-22 15:06:45.947453336 +0600
@@ -1266,17 +1266,6 @@
>>> e = Email(resolve_domain=True)
>>> e.resolve_domain
True
- >>> e.to_python('[email protected]')
- '[email protected]'
- >>> e.to_python('[email protected]')
- '[email protected]'
- >>> # NOTE: If you do not have PyDNS installed this example won't work:
- >>> e.to_python('[email protected]')
- Traceback (most recent call last):
- ...
- Invalid: The domain of the email address does not exist (the portion
after the @: thisdomaindoesnotexistithinkforsure.com)
- >>> e.to_python(u'[email protected]')
- u'[email protected]'
>>> e = Email(not_empty=False)
>>> e.to_python('')
@@ -1393,22 +1382,6 @@
Traceback (most recent call last):
...
Invalid: That is not a valid URL
- >>> u = URL(add_http=False, check_exists=True)
- >>> u.to_python('http://google.com')
- 'http://google.com'
- >>> u.to_python('google.com')
- Traceback (most recent call last):
- ...
- Invalid: You must start your URL with http://, https://, etc
- >>> u.to_python('http://www.formencode.org/does/not/exist/page.html')
- Traceback (most recent call last):
- ...
- Invalid: The server responded that the page could not be found
- >>>
u.to_python('http://this.domain.does.not.exist.example.org/test.html')
- ... # doctest: +ELLIPSIS
- Traceback (most recent call last):
- ...
- Invalid: An error occured when trying to connect to the server: ...
If you want to allow addresses without a TLD (e.g., ``localhost``) you can
do::
--
WBR, wRAR
signature.asc
Description: Digital signature

