mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
skip if swift not installed
This commit is contained in:
parent
ca731268a4
commit
ac2520c86f
2 changed files with 8 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import distutils
|
||||||
import os.path
|
import os.path
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
|
@ -68,6 +69,11 @@ skipif_slowtests_false = pytest.mark.skipif(
|
||||||
reason='slowtests=false',
|
reason='slowtests=false',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
skipif_cant_run_swift = pytest.mark.skipif(
|
||||||
|
distutils.spawn.find_executable('swift') is None,
|
||||||
|
reason='swift isn\'t installed or can\'t be found'
|
||||||
|
)
|
||||||
|
|
||||||
xfailif_windows_no_ruby = pytest.mark.xfail(
|
xfailif_windows_no_ruby = pytest.mark.xfail(
|
||||||
os.name == 'nt',
|
os.name == 'nt',
|
||||||
reason='Ruby support not yet implemented on windows.',
|
reason='Ruby support not yet implemented on windows.',
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ from testing.fixtures import make_config_from_repo
|
||||||
from testing.fixtures import make_repo
|
from testing.fixtures import make_repo
|
||||||
from testing.fixtures import modify_manifest
|
from testing.fixtures import modify_manifest
|
||||||
from testing.util import skipif_cant_run_docker
|
from testing.util import skipif_cant_run_docker
|
||||||
|
from testing.util import skipif_cant_run_swift
|
||||||
from testing.util import skipif_slowtests_false
|
from testing.util import skipif_slowtests_false
|
||||||
from testing.util import xfailif_no_pcre_support
|
from testing.util import xfailif_no_pcre_support
|
||||||
from testing.util import xfailif_windows_no_node
|
from testing.util import xfailif_windows_no_node
|
||||||
|
|
@ -214,6 +215,7 @@ def test_system_hook_with_spaces(tempdir_factory, store):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@skipif_cant_run_swift
|
||||||
@pytest.mark.integration
|
@pytest.mark.integration
|
||||||
def test_swift_hook(tempdir_factory, store):
|
def test_swift_hook(tempdir_factory, store):
|
||||||
_test_hook_repo(
|
_test_hook_repo(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue