From: Magnus Jacobsson Date: Sat, 25 Jul 2020 21:24:15 +0000 (+0200) Subject: Convert test_large_graphs.py to pytest X-Git-Tag: 2.46.0~20^2^2~174^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef754eeca6effa2ba2033a5f9dc6782b8a481ecc;p=graphviz Convert test_large_graphs.py to pytest --- diff --git a/tests/regression_tests/large/test_large_graphs.py b/tests/regression_tests/large/test_large_graphs.py index b6f69c9b0..7c4d047ce 100644 --- a/tests/regression_tests/large/test_large_graphs.py +++ b/tests/regression_tests/large/test_large_graphs.py @@ -1,12 +1,12 @@ -from unittest import TestCase, skipIf +import pytest import subprocess import os import sys -class TestLargeGraphs(TestCase): - @skipIf(sys.platform == 'win32', reason='https://gitlab.com/graphviz/graphviz/-/issues/1710') +class TestLargeGraphs(): + @pytest.mark.skipif(sys.platform == 'win32', reason='https://gitlab.com/graphviz/graphviz/-/issues/1710') def test_long_chain(self): """ This test will fail on 32bit Windows machine if compiled with stack size < 16MB. diff --git a/tests/regression_tests/regression_tests.ps1 b/tests/regression_tests/regression_tests.ps1 index b9e05b1c5..ba146df64 100644 --- a/tests/regression_tests/regression_tests.ps1 +++ b/tests/regression_tests/regression_tests.ps1 @@ -7,4 +7,4 @@ Pop-Location # messages as an error, failing the pipeline. So we must redirect # stderr to stdout. The line noise at the end does so. See # https://stackoverflow.com/a/20950421/171898 for explanation. -python -m unittest discover large 2>&1 | %{ "$_" } +python -m pytest large 2>&1 | %{ "$_" }