Skip to content

Commit

Permalink
skipif does not prevent decorator evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
memery-rbx committed Dec 17, 2019
1 parent 1b3d15f commit 7250fa8
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,17 +496,14 @@ def test_tuple_unpacking(self):
self.assertEqual(len(ret), 0)


@pytest.mark.skipif(
sys.version_info < (3, 6),
reason='Hypothesmith requires Python 3.6',
)
@given(source_code=hypothesmith.from_grammar())
def test_builtin_works_on_many_examples(source_code):
try:
source = source_code.encode('utf-8-sig')
except UnicodeEncodeError:
reject()
raise
tree = ast.parse(source)
checker = BuiltinsChecker(tree, '/home/script.py')
assert isinstance([c for c in checker.run()], list)
if sys.version_info >= (3, 6):
@given(source_code=hypothesmith.from_grammar())
def test_builtin_works_on_many_examples(source_code):
try:
source = source_code.encode('utf-8-sig')
except UnicodeEncodeError:
reject()
raise
tree = ast.parse(source)
checker = BuiltinsChecker(tree, '/home/script.py')
assert isinstance([c for c in checker.run()], list)

0 comments on commit 7250fa8

Please sign in to comment.