# Path: pygr/logger.py
# PYTHON_25 = sys.version_info >= (2, 5)
# def get_logger(name='pygr-log', stream=sys.stdout, formatter=None):
# def disable(level=0):
# def test(verbose=0):


import unittest
from pygr import logger
    from nose.plugins.skip import SkipTest

    def addError(self, test, err):
        exc_type, val, _ = err
        if issubclass(exc_type, SkipTest):
            self.skipped.append((self, val))
            if self.showAll:                         # report skips: SKIP/S
                self.stream.writeln("SKIP")
            elif self.dots:
                self.stream.write('S')
        else:
            unittest._TextTestResult.addError(self, test, err)


class PygrTestRunner(unittest.TextTestRunner):
    """
    Support running tests that understand SkipTest.
    """

    def _makeResult(self):
        return PygrTestResult(self.stream, self.descriptions,
                              self.verbosity)


class PygrTestProgram(unittest.TestProgram):

    def __init__(self, **kwargs):
        verbosity = kwargs.pop('verbosity', 1)
        if verbosity < 1:
            logger.disable('INFO')  # Should implicity disable DEBUG as well
        elif verbosity < 2:

# Path: pygr/logger.py
# PYTHON_25 = sys.version_info >= (2, 5)
# def get_logger(name='pygr-log', stream=sys.stdout, formatter=None):
# def disable(level=0):
# def test(verbose=0):


# Path: tests/testlib/unittest_extensions.py
import unittest
from pygr import logger
    from nose.plugins.skip import SkipTest


    def addError(self, test, err):
        exc_type, val, _ = err
        if issubclass(exc_type, SkipTest):
            self.skipped.append((self, val))
            if self.showAll:                         # report skips: SKIP/S
                self.stream.writeln("SKIP")
            elif self.dots:
                self.stream.write('S')
        else:
            unittest._TextTestResult.addError(self, test, err)


class PygrTestRunner(unittest.TextTestRunner):
    """
    Support running tests that understand SkipTest.
    """

    def _makeResult(self):
        return PygrTestResult(self.stream, self.descriptions,
                              self.verbosity)


class PygrTestProgram(unittest.TestProgram):

    def __init__(self, **kwargs):
        verbosity = kwargs.pop('verbosity', 1)
        if verbosity < 1:
            logger.disable('INFO')  # Should implicity disable DEBUG as well
        elif verbosity < 2:

            logger.disable('DEBUG')