Beispiel #1
0
def check_file(path):
    from pylama.main import parse_options, process_paths
    from pylama.config import CURDIR

    options = parse_options()
    path = op.relpath(str(path), CURDIR)
    return process_paths(options, candidates=[path], error=False)
Beispiel #2
0
def check_file(path):
    from pylama.main import parse_options, process_paths
    from pylama.config import CURDIR

    options = parse_options()
    path = op.relpath(str(path), CURDIR)
    return process_paths(options, candidates=[path], error=False)
Beispiel #3
0
 def test_pylama(self):
     from pylama.main import parse_options, process_paths
     from pylama.config import LOGGER
     LOGGER.setLevel(logging.WARN)
     options = parse_options(['pybsm'], verbose=False)
     errors = process_paths(options, error=False)
     if len(errors):
         if os.environ.get('DEV', None) == '1':
             pytest.skip(msg="Should not have pylama errors but has")
         else:
             pytest.fail(msg="Should not have pylama errors", pytrace=False)
     else:
         self.assertTrue(True, 'pylama with no errors')
Beispiel #4
0
 def test_pylama(self):
     from pylama.main import parse_options, process_paths
     from pylama.config import LOGGER
     LOGGER.setLevel(logging.WARN)
     options = parse_options(['pybsm'],
                             verbose=False
                             )
     errors = process_paths(options, error=False)
     if len(errors):
         if os.environ.get('DEV', None) == '1':
             pytest.skip(msg="Should not have pylama errors but has")
         else:
             pytest.fail(msg="Should not have pylama errors", pytrace=False)
     else:
         self.assertTrue(True, 'pylama with no errors')