Giter Site home page Giter Site logo

Errors when running the tests about mechanize HOT 7 CLOSED

djc avatar djc commented on August 22, 2024
Errors when running the tests

from mechanize.

Comments (7)

jjlee avatar jjlee commented on August 22, 2024

What did you expect to happen?

from mechanize.

djc avatar djc commented on August 22, 2024

I expect to be able to run tests without warnings.

from mechanize.

jjlee avatar jjlee commented on August 22, 2024

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.

jjlee avatar jjlee commented on August 22, 2024

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.

jjlee avatar jjlee commented on August 22, 2024

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.

djc avatar djc commented on August 22, 2024

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.

jjlee avatar jjlee commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.