summaryrefslogtreecommitdiffstats
path: root/tests/repository_test.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-07-03 19:27:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-07-03 19:27:41 +0000
commitcfdc7f87405930730923bcd2af351c5be87522b4 (patch)
tree2b1d811c24240697935c5bc2a56e9d2530a69a4b /tests/repository_test.py
parentReleasing debian version 2.5.1-1. (diff)
downloadpre-commit-cfdc7f87405930730923bcd2af351c5be87522b4.tar.xz
pre-commit-cfdc7f87405930730923bcd2af351c5be87522b4.zip
Merging upstream version 2.6.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/repository_test.py')
-rw-r--r--tests/repository_test.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/repository_test.py b/tests/repository_test.py
index 2ac7886..84e4da9 100644
--- a/tests/repository_test.py
+++ b/tests/repository_test.py
@@ -34,7 +34,6 @@ from testing.util import get_resource_path
from testing.util import skipif_cant_run_docker
from testing.util import skipif_cant_run_swift
from testing.util import xfailif_windows
-from testing.util import xfailif_windows_no_ruby
def _norm_out(b):
@@ -235,6 +234,7 @@ def test_run_a_docker_image_hook(tempdir_factory, store, hook_id):
)
+@xfailif_windows # pragma: win32 no cover
def test_run_a_node_hook(tempdir_factory, store):
_test_hook_repo(
tempdir_factory, store, 'node_hooks_repo',
@@ -260,7 +260,14 @@ def test_run_versioned_node_hook(tempdir_factory, store):
)
-@xfailif_windows_no_ruby
+@xfailif_windows # pragma: win32 no cover
+def test_node_hook_with_npm_userconfig_set(tempdir_factory, store, tmpdir):
+ cfg = tmpdir.join('cfg')
+ cfg.write('cache=/dne\n')
+ with mock.patch.dict(os.environ, NPM_CONFIG_USERCONFIG=str(cfg)):
+ test_run_a_node_hook(tempdir_factory, store)
+
+
def test_run_a_ruby_hook(tempdir_factory, store):
_test_hook_repo(
tempdir_factory, store, 'ruby_hooks_repo',
@@ -268,7 +275,7 @@ def test_run_a_ruby_hook(tempdir_factory, store):
)
-@xfailif_windows_no_ruby
+@xfailif_windows # pragma: win32 no cover
def test_run_versioned_ruby_hook(tempdir_factory, store):
_test_hook_repo(
tempdir_factory, store, 'ruby_versioned_hooks_repo',
@@ -278,7 +285,7 @@ def test_run_versioned_ruby_hook(tempdir_factory, store):
)
-@xfailif_windows_no_ruby
+@xfailif_windows # pragma: win32 no cover
def test_run_ruby_hook_with_disable_shared_gems(
tempdir_factory,
store,
@@ -524,7 +531,6 @@ def test_additional_dependencies_roll_forward(tempdir_factory, store):
assert 'mccabe' not in cmd_output('pip', 'freeze', '-l')[1]
-@xfailif_windows_no_ruby # pragma: win32 no cover
def test_additional_ruby_dependencies_installed(tempdir_factory, store):
path = make_repo(tempdir_factory, 'ruby_hooks_repo')
config = make_config_from_repo(path)