예제 #1
0
def test():
    """At least a single pass is required.
    """
    try:
        feedev.testmod()
    except Exception, e:
        assert "nothing to test" in str(e)
예제 #2
0
def test_log_output_is_captured():
    """Make sure the dev sees the log generated by the library if a
    test fails.
    """

    old_stdout = sys.stdout
    sys.stdout = StringIO()
    try:
        log.reset()

        feedev.testmod()
        sys.stdout.seek(0)
        stdout = sys.stdout.read()
    finally:
        sys.stdout = old_stdout
        log.reset()

    print "stdout was: ", stdout    # already goes to nose again
    assert 'Updating feed #1' in stdout
def test():
    feedev.testmod()
예제 #4
0
def test_all_handlers_are_called():
    try:
        feedev.testmod()
    finally:
        assert tests_run == 4