1import pytest 2 3from . import v 4 5assert v # Silence pyflakes. 6 7 8def test_syntax_error(v): 9 v.scan("foo bar") 10 assert int(v.report()) == 1 11 12 13def test_null_byte(v): 14 v.scan("\x00") 15 assert int(v.report()) == 1 16 17 18def test_confidence_range(v): 19 v.scan( 20 """\ 21def foo(): 22 pass 23""" 24 ) 25 with pytest.raises(ValueError): 26 v.get_unused_code(min_confidence=150) 27