Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite can fail on some hosts #25

Open
dnephin opened this issue Apr 15, 2015 · 1 comment
Open

Test suite can fail on some hosts #25

dnephin opened this issue Apr 15, 2015 · 1 comment

Comments

@dnephin
Copy link
Contributor

dnephin commented Apr 15, 2015

I ran the test suite on my desktop, and ran into 3 test failures:

tests/util/validate_spec_url_test.py:10: test_raise_SwaggerValidationError_on_urlopen_error
tests/validator12/validate_spec_url_test.py:50: test_raise_SwaggerValidationError_on_urlopen_error
tests/validator20/validate_spec_url_test.py:20: test_raise_SwaggerValidationError_on_urlopen_error

They all fail with:

assert '<urlopen error [Errno -2] Name or service not known>' in '<urlopen error [Errno -5] No address associated with hostname>'

It seems like the test suite assumes a specific error about the bogus url that is not always true. These assertions should probably be a little more generic.

@prat0318
Copy link
Contributor

If there are more possible error reasons for bogus urls, a possible fix can be to check for 'urlopen error' instead of the complete reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants