예제 #1
0
def check_file(path):
    from pylama.main import parse_options, check_files
    from pylama.config import CURDIR

    options = parse_options()
    path = op.relpath(str(path), CURDIR)
    return check_files([path], options, error=False)
예제 #2
0
def test_shell():
    errors = shell('-o dummy dummy.py'.split(), error=False)
    assert errors

    options = parse_options()
    errors = check_files(['dummy.py'], options=options, error=False)
    assert errors

    errors = shell(['unknown.py'], error=False)
    assert not errors
예제 #3
0
    def test_shell(self):
        from pylama.main import shell, check_files

        errors = shell('-o dummy dummy.py'.split(), error=False)
        self.assertTrue(errors)

        options = parse_options()
        errors = check_files(['dummy.py'], options=options, error=False)
        self.assertTrue(errors)

        errors = shell(['unknown.py'], error=False)
        self.assertFalse(errors)
예제 #4
0
파일: tests.py 프로젝트: ClearcodeHQ/pylama
    def test_shell(self):
        from pylama.main import shell, check_files

        errors = shell('-o dummy dummy.py'.split(), error=False)
        self.assertTrue(errors)

        options = parse_options()
        errors = check_files(['dummy.py'], options=options, error=False)
        self.assertTrue(errors)

        errors = shell(['unknown.py'], error=False)
        self.assertTrue(errors)