Code Monkey home page Code Monkey logo

Comments (4)

infothrill avatar infothrill commented on May 29, 2024

I'm pretty happy with the standard unittest. unittests don't validate the "error freeness" of code but verify behaviour changes. As such, the console output of tests is only interesting if a test fails indeed. I'll turn down the logging for now. I ran pytest on the project and it seems to not detect the existing tests (at least not automatically), but exits gracefully with no error reported. Running nose however finds all the tests and hides console output unless a test fails. nose requires no code changes other than maybe depending on nose for running the tests in the setup.py script. Would that be a compromise that satisfies you? On a side note, I do prefer unittest also because of its integration into the pydev eclipse IDE...

from python-dyndnsc.

ThomasWaldmann avatar ThomasWaldmann commented on May 29, 2024

nose is a bit better than unittest, but py.test is a lot better. everybody moves that way currently (including projects moving from nose to py.test). ;)

usually py.test is quite compatible and discovers tests from nose (and iirc also from unittest), I'll have a look why it does not in this case.

concerning pydev integration: yeah, integration might be nice, but the question is what the bigger pain is.
I use pycharm (used vim and pydev/eclipse before) and it's quite nice. Often I run tests in a terminal window separately, but iirc pycharm integrates py.test tests nicely.

from python-dyndnsc.

infothrill avatar infothrill commented on May 29, 2024

I just realized nose an py.test work just fine in Eclipse! The default testsuite runner of unittest does not capture output. I do not consider that a problem, since I'd rather not even look at the test output unless required to. Either way, running nosetests in the top level directory works just fine for me. I don't know why py.test failed on me. I am not sure I want to debug that either.

What now?

from python-dyndnsc.

ThomasWaldmann avatar ThomasWaldmann commented on May 29, 2024

py.test detects tests based on file, function and classnames.

test_*.py

class Test*

function/method test_*

guess that is the reason why it doesn't autodiscover your stuff. we can fix that by either telling it your patterns or renaming stuff so it fits the standard patterns. please decide/tell what you prefer.

from python-dyndnsc.

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.