From: Matthew Fernandez Date: Sun, 25 Oct 2020 02:53:06 +0000 (-0700) Subject: move some pytest skip logic into a decorator X-Git-Tag: 2.46.0~20^2^2~11^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e03606be403ea07db486d055a831a2188902cce7;p=graphviz move some pytest skip logic into a decorator For more consistency with other tests. --- diff --git a/rtest/test_examples.py b/rtest/test_examples.py index 364b1a314..1d6de61ce 100644 --- a/rtest/test_examples.py +++ b/rtest/test_examples.py @@ -70,13 +70,10 @@ def test_compile_example(src): 'addranks', 'anon', 'bb', 'chkclusters', 'cliptree', 'col', 'color', 'dechain', 'deledges', 'delnodes', 'dijkstra', 'get-layers-list', 'knbhd', 'maxdeg', 'rotate', 'scalexy', 'topon']) +@pytest.mark.skipif(shutil.which('gvpr') is None, reason='GVPR not available') def test_gvpr_example(src): '''check GVPR can parse the given example''' - # skip this test if GVPR is unavailable - if shutil.which('gvpr') is None: - pytest.skip('GVPR not available') - # FIXME: remove when https://gitlab.com/graphviz/graphviz/-/issues/1784 is fixed if os.environ.get('build_system') == 'msbuild' and \ os.environ.get('configuration') == 'Debug' and \