Skip to content

Commit

Permalink
ci: deactivate tests under Windows
Browse files Browse the repository at this point in the history
Due to incompatibilities ofi `git-annex`
with `git-worktree` on Windows a number
of tests are skipped on Windows
  • Loading branch information
christian-monch committed Oct 24, 2024
1 parent c16e22b commit 76e4d8b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datalad_remake/annexremotes/tests/test_hierarchies.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest
from datalad.distribution.get import Get as datalad_Get
from datalad_next.datasets import Dataset
from datalad_next.tests import skip_if_on_windows

from datalad_remake.commands.tests.create_datasets import (
create_simple_computation_dataset,
Expand Down Expand Up @@ -74,6 +75,7 @@ def _check_content(dataset, file_content: Iterable[tuple[str, str]]):
assert (dataset.pathobj / file).read_text() == content


@skip_if_on_windows
@pytest.mark.parametrize('output_pattern', [output_pattern_static, output_pattern_glob])
def test_end_to_end(tmp_path, monkeypatch, output_pattern):
root_dataset = create_simple_computation_dataset(tmp_path, 'd2', 3, test_method)
Expand Down
2 changes: 2 additions & 0 deletions datalad_remake/annexremotes/tests/test_remake_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import cast

from annexremote import Master
from datalad_next.tests import skip_if_on_windows

from datalad_remake.commands.tests.create_datasets import create_ds_hierarchy

Expand Down Expand Up @@ -62,6 +63,7 @@ def send(self, value):
self.input.put(value)


@skip_if_on_windows
def test_compute_remote_main(tmp_path, monkeypatch):
dataset = create_ds_hierarchy(tmp_path, 'ds1', 0)[0][2]
monkeypatch.chdir(dataset.path)
Expand Down
3 changes: 3 additions & 0 deletions datalad_remake/commands/tests/test_collection.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from pathlib import Path

from datalad_next.tests import skip_if_on_windows

from ..make_cmd import collect
from .create_datasets import create_ds_hierarchy
from .test_provision import get_file_list


@skip_if_on_windows
def test_collect(tmp_path):
dataset = create_ds_hierarchy(tmp_path, 'ds1', 1)[0][2]

Expand Down
3 changes: 3 additions & 0 deletions datalad_remake/commands/tests/test_compute.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from datalad_next.datasets import Dataset
from datalad_next.tests import skip_if_on_windows

from datalad_remake.commands.tests.create_datasets import (
create_simple_computation_dataset,
Expand All @@ -13,6 +14,7 @@
output_pattern = ['a.txt']


@skip_if_on_windows
def test_duplicated_computation(tmp_path):
root_dataset = create_simple_computation_dataset(tmp_path, 'ds1', 0, test_method)

Expand All @@ -21,6 +23,7 @@ def test_duplicated_computation(tmp_path):
_run_simple_computation(root_dataset)


@skip_if_on_windows
def test_speculative_computation(tmp_path, datalad_cfg):
root_dataset = create_simple_computation_dataset(tmp_path, 'ds1', 0, test_method)

Expand Down
6 changes: 6 additions & 0 deletions datalad_remake/commands/tests/test_provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from datalad_next.datasets import Dataset
from datalad_next.runners import call_git_lines
from datalad_next.tests import skip_if_on_windows

from ..make_cmd import provide_context
from .create_datasets import create_ds_hierarchy
Expand All @@ -31,6 +32,7 @@
b_paths = [path.format(file='b') for path in file_path_templates]


@skip_if_on_windows
def test_worktree_basic(tmp_path):
dataset = create_ds_hierarchy(tmp_path, 'ds1', 3)[0][2]
inputs = [
Expand Down Expand Up @@ -67,6 +69,7 @@ def check_deleted_worktrees(ds: Dataset):
)


@skip_if_on_windows
def test_worktree_globbing(tmp_path):
dataset = create_ds_hierarchy(tmp_path, 'ds1', 3)[0][2]
result = dataset.provision(
Expand Down Expand Up @@ -119,6 +122,7 @@ def get_file_list(
yield str((prefix / child).relative_to(root))


@skip_if_on_windows
def test_provision_context(tmp_path):
dataset = create_ds_hierarchy(tmp_path, 'ds1')[0][2]
with provide_context(dataset, branch=None, input_patterns=['**']) as worktree:
Expand Down Expand Up @@ -157,6 +161,7 @@ def test_unclean_dataset(tmp_path):
)


@skip_if_on_windows
def test_branch_deletion_after_provision(tmp_path):
dataset = create_ds_hierarchy(tmp_path, 'ds1', 3)[0][2]
with provide_context(
Expand All @@ -169,6 +174,7 @@ def test_branch_deletion_after_provision(tmp_path):
assert worktree.name not in branches


@skip_if_on_windows
def test_not_present_local_datasets(tmp_path):
root_ds = Dataset(tmp_path / 'ds1')
root_ds.create(cfg_proc='text2git', result_renderer='disabled')
Expand Down

0 comments on commit 76e4d8b

Please sign in to comment.