Comments (7)
What did you expect to happen?
from mechanize.
I expect to be able to run tests without warnings.
from mechanize.
OK, thanks.
The warning tells me or a developer using mechanize why the tests are skipped, which is useful information to those users.
Does gentoo typically run tests when installing an ebuild? Is that why you don't want it to print the warnings? If so, is there a reason why your ebuild can't send stdout/stderr of test.py somewhere other than the stdout/stderr of your ebuild? It could use the exit status of test.py to ensure that something appropriate is output (for example, it could print nothing if the exit code was zero, or otherwise print the output of test.py).
from mechanize.
BTW, these warnings are not errors: they don't indicate that the test run failed, and the 0 exit status of test.py reflects that.
from mechanize.
Just for completeness: the SyntaxWarning is an annoyance that's hard to suppress, IIRC (hard for test.py, not hard for you, since you can just suppress the whole output).
from mechanize.
We use the tests to verify that the package works correctly (but we'd prefer not to install twisted just to run the test). Even if I understand that the second warning is useful somehow, the first warning is something you could easily fix, right?
BTW, I know run the tests with -Wignore, which seems okay for this.
from mechanize.
You should use the exit status of test.py if you want to know whether the tests ran successfully.
If you want to know whether the package works correctly, then you get to choose whether to make that decision based on running all of the tests, or just the ones that don't require twisted.
I still don't think this is a bug, so I'm closing the issue. If there's some specific thing you can't achieve without a change to mechanize, feel free to re-open it.
from mechanize.
Related Issues (20)
- _form.py have an error
- HTML5 element not visible
- Updating referer in case of URL redirection
- ImportError HOT 2
- ParseError: OPTION outside of SELECT if there is <option> tag somewhere inside <script> tag
- urllib2.URLError: <urlopen error no host given> HOT 1
- Does this mechanize poke private implementation of socket.py?
- open response in browser after submit forms
- Mechanize parses <script> contents with bad results HOT 1
- Incorrect textarea CRLF normalization when parsing chunks.
- add_file with image/gif file
- Python Mechanize can no longer log into Amazon.com
- mechanize giving ssl errors
- Plan ongoing support for this library or mark it deprecated here & on PyPI HOT 11
- Authorization with NTLM getting AttributeError: HTTPResponse instance has no attribute '__iter__' HOT 2
- socket.error: [Errno 54] Connection reset by peer on very specific case
- browser.submit() randomly stucks forever without throwing an exception
- clean uninstallation
- Support Python 3 HOT 4
- Fake socket is not compatible with PyPy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mechanize.