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)
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
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)
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)