def run_tests(self):
    try:
        import pytest
    except:
        raise RuntimeError('py.test is not installed, run: pip install pytest')
    params = {'args': self.test_args}
    if self.cov:
        params['args'] += self.cov
    if self.junitxml:
        params['args'] += self.junitxml
    params['args'] += ['--doctest-modules', MAIN_PACKAGE, '-s']
    errno = pytest.main(**params)
    sys.exit(errno)
def run_tests(self):
    try:
        import pytest
    except:
        raise RuntimeError('py.test is not installed, run: pip install pytest')
    params = {'args': self.test_args}
    if self.cov:
        params['args'] += self.cov
    if self.junitxml:
        params['args'] += self.junitxml
    params['args'] += ['--doctest-modules', MAIN_PACKAGE, '-s']
    errno = pytest.main(**params)
    sys.exit(errno)