1
0
Fork 0
pre-commit-hooks/tests/check_ast_test.py
Daniel Baumann 6bd375ed5f
Adding upstream version 4.5.0+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-09 20:21:14 +01:00

14 lines
306 B
Python

from __future__ import annotations
from pre_commit_hooks.check_ast import main
from testing.util import get_resource_path
def test_failing_file():
ret = main([get_resource_path('cannot_parse_ast.notpy')])
assert ret == 1
def test_passing_file():
ret = main([__file__])
assert ret == 0