Skip to content

Commit

Permalink
TST: Mark all failing testrepo-based tests as broken on windows
Browse files Browse the repository at this point in the history
A bunch of additional tests are running now. Each failure is annotated
with a link the the traceback log.
  • Loading branch information
mih committed Jan 1, 2020
1 parent 8f5f4df commit ecd6034
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 3 deletions.
3 changes: 2 additions & 1 deletion datalad/core/local/tests/test_run.py
Expand Up @@ -253,8 +253,9 @@ def test_run_from_subds_gh3551(path):
ok_(subds.repo.file_has_content("f"))


#https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789009#step:8:644
@known_failure_windows
@slow # ~10s
# use of testrepos is broken on Windows and causes this test to be skipped there
@with_testrepos('basic_annex', flavors=['clone'])
def test_run_explicit(path):
ds = Dataset(path)
Expand Down
9 changes: 9 additions & 0 deletions datalad/distribution/tests/test_clone.py
Expand Up @@ -64,6 +64,7 @@
skip_if,
with_sameas_remote,
known_failure_appveyor,
known_failure_windows,
)
from datalad.distribution.clone import _get_installationpath_from_url
from datalad.distribution.dataset import Dataset
Expand Down Expand Up @@ -147,6 +148,8 @@ def test_clone_datasets_root(tdir):
assert_status('error', res)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:258
@known_failure_windows
@with_testrepos('.*basic.*', flavors=['local-url', 'network', 'local'])
@with_tempfile(mkdir=True)
def test_clone_simple_local(src, path):
Expand Down Expand Up @@ -189,6 +192,8 @@ def test_clone_simple_local(src, path):
eq_(uuid_before, ds.repo.uuid)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:216
@known_failure_windows
@with_testrepos(flavors=['local-url', 'network', 'local'])
@with_tempfile
def test_clone_dataset_from_just_source(url, path):
Expand Down Expand Up @@ -222,6 +227,8 @@ def test_clone_dataladri(src, topurl, path):
ok_file_has_content(op.join(path, 'test.txt'), 'some')


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:236
@known_failure_windows
@with_testrepos('submodule_annex', flavors=['local', 'local-url', 'network'])
@with_tempfile(mkdir=True)
@with_tempfile(mkdir=True)
Expand Down Expand Up @@ -270,6 +277,8 @@ def test_clone_into_dataset(source, top_path):
ok_clean_git(ds.path, untracked=['dummy.txt'])


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:278
@known_failure_windows
@with_testrepos('submodule_annex', flavors=['local', 'local-url', 'network'])
@with_tempfile(mkdir=True)
def test_notclone_known_subdataset(src, path):
Expand Down
3 changes: 2 additions & 1 deletion datalad/distribution/tests/test_dataset.py
Expand Up @@ -62,7 +62,8 @@ def test_EnsureDataset():

# TODO: test remember/recall more extensive?


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:531
@known_failure_windows
@with_testrepos('submodule_annex')
@with_tempfile(mkdir=True)
def test_is_installed(src, path):
Expand Down
3 changes: 3 additions & 0 deletions datalad/distribution/tests/test_get.py
Expand Up @@ -41,6 +41,7 @@
from datalad.tests.utils import assert_message
from datalad.tests.utils import serve_path_via_http
from datalad.tests.utils import slow
from datalad.tests.utils import known_failure_windows
from datalad.utils import with_pathsep
from datalad.utils import chpwd
from datalad.utils import assure_list
Expand Down Expand Up @@ -299,6 +300,8 @@ def test_get_recurse_dirs(o_path, c_path):
ok_(ds.repo.file_has_content('file1.txt') is True)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:541
@known_failure_windows
@slow # 15.1496s
@with_testrepos('submodule_annex', flavors='local')
@with_tempfile(mkdir=True)
Expand Down
10 changes: 10 additions & 0 deletions datalad/distribution/tests/test_install.py
Expand Up @@ -214,6 +214,8 @@ def test_install_datasets_root(tdir):
assert_in("already exists and not empty", str(cme.exception))


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:360
@known_failure_windows
@with_testrepos('.*basic.*', flavors=['local-url', 'network', 'local'])
@with_tempfile(mkdir=True)
def test_install_simple_local(src, path):
Expand Down Expand Up @@ -253,6 +255,8 @@ def test_install_simple_local(src, path):
eq_(uuid_before, ds.repo.uuid)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:298
@known_failure_windows
@with_testrepos(flavors=['local-url', 'network', 'local'])
@with_tempfile
def test_install_dataset_from_just_source(url, path):
Expand Down Expand Up @@ -318,6 +322,8 @@ def test_install_dataladri(src, topurl, path):
ok_file_has_content(opj(path, 'test.txt'), 'some')


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:338
@known_failure_windows
@with_testrepos('submodule_annex', flavors=['local', 'local-url', 'network'])
@with_tempfile(mkdir=True)
@with_tempfile(mkdir=True)
Expand Down Expand Up @@ -398,6 +404,8 @@ def test_install_recursive_with_data(src, path):
ok_(all(subds.repo.file_has_content(subds.repo.get_annexed_files())))


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:555
@known_failure_windows
@slow # 88.0869s because of going through multiple test repos, ~8sec each time
@with_testrepos('.*annex.*', flavors=['local'])
# 'local-url', 'network'
Expand Down Expand Up @@ -467,6 +475,8 @@ def test_failed_install_multiple(top_path):
{'///nonexisting', _path_(top_path, 'ds2')})


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:318
@known_failure_windows
@with_testrepos('submodule_annex', flavors=['local', 'local-url', 'network'])
@with_tempfile(mkdir=True)
def test_install_known_subdataset(src, path):
Expand Down
6 changes: 6 additions & 0 deletions datalad/distribution/tests/test_publish.py
Expand Up @@ -102,6 +102,8 @@ def test_smth_about_not_supported(p1, p2):
publish(to='target1', since='HEAD^') # must not fail now


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:571
@known_failure_windows
@with_testrepos('submodule_annex', flavors=['local']) #TODO: Use all repos after fixing them
@with_tempfile(mkdir=True)
@with_tempfile(mkdir=True)
Expand Down Expand Up @@ -225,6 +227,8 @@ def test_publish_plain_git(origin, src_path, dst_path):
eq_(res, [source])


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:380
@known_failure_windows
@with_testrepos('submodule_annex', flavors=['local'])
@with_tempfile
@with_tempfile(mkdir=True)
Expand Down Expand Up @@ -394,6 +398,8 @@ def test_publish_recursive(pristine_origin, origin_path, src_path, dst_path, sub
assert_status("notneeded", publish(since='', dataset=source.path))


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:452
@known_failure_windows
@with_testrepos('submodule_annex', flavors=['local']) #TODO: Use all repos after fixing them
@with_tempfile(mkdir=True)
@with_tempfile(mkdir=True)
Expand Down
5 changes: 5 additions & 0 deletions datalad/distribution/tests/test_uninstall.py
Expand Up @@ -43,6 +43,7 @@
from datalad.tests.utils import use_cassette
from datalad.tests.utils import usecase
from datalad.tests.utils import known_failure_githubci_win
from datalad.tests.utils import known_failure_windows
from datalad.utils import chpwd
from datalad.utils import _path_
from datalad.support.external_versions import external_versions
Expand Down Expand Up @@ -126,6 +127,8 @@ def test_uninstall_invalid(path):
assert_status('error', method(dataset=ds, path='../madeupnonexist', on_failure='ignore'))


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:489
@known_failure_windows
@with_testrepos('basic_annex', flavors=['clone'])
def test_uninstall_annex_file(path):
ds = Dataset(path)
Expand Down Expand Up @@ -182,6 +185,8 @@ def test_uninstall_git_file(path):
eq_(res, ['INFO.txt'])


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:509
@known_failure_windows
@with_testrepos('submodule_annex', flavors=['local'])
@with_tempfile(mkdir=True)
def test_uninstall_subdataset(src, dst):
Expand Down
4 changes: 4 additions & 0 deletions datalad/distribution/tests/test_update.py
Expand Up @@ -40,6 +40,8 @@
from datalad.tests.utils import known_failure_windows


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:622
@known_failure_windows
@slow
@with_testrepos('submodule_annex', flavors=['local']) #TODO: Use all repos after fixing them
@with_tempfile(mkdir=True)
Expand Down Expand Up @@ -163,6 +165,8 @@ def test_update_git_smoke(src_path, dst_path):
ok_file_has_content(opj(target.path, 'file.dat'), '123')


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789022#step:8:606
@known_failure_windows
@slow # 20.6910s
@with_testrepos('.*annex.*', flavors=['clone'])
@with_tempfile(mkdir=True)
Expand Down
3 changes: 3 additions & 0 deletions datalad/interface/tests/test_unlock.py
Expand Up @@ -40,6 +40,7 @@
assert_result_count,
assert_status,
known_failure_githubci_win,
known_failure_windows,
)


Expand Down Expand Up @@ -85,6 +86,8 @@ def test_unlock_raises(path, path2, path3):

# Note: As root there is no actual lock/unlock.
# Therefore don't know what to test for yet.
# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789027#step:8:134
@known_failure_windows
@skip_if(cond=not on_windows and os.geteuid() == 0) # uid not available on windows
@with_testrepos('.*annex.*', flavors=['clone'])
def test_unlock(path):
Expand Down
3 changes: 3 additions & 0 deletions datalad/local/tests/test_subdataset.py
Expand Up @@ -33,9 +33,12 @@
assert_in,
assert_not_in,
assert_status,
known_failure_windows,
)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:275
@known_failure_windows
@with_testrepos('.*nested_submodule.*', flavors=['clone'])
def test_get_subdatasets(path):
ds = Dataset(path)
Expand Down
17 changes: 17 additions & 0 deletions datalad/support/tests/test_annexrepo.py
Expand Up @@ -88,6 +88,7 @@
from datalad.tests.utils import set_annex_version
from datalad.tests.utils import known_failure_githubci_win
from datalad.tests.utils import with_sameas_remote
from datalad.tests.utils import known_failure_windows

from datalad.support.exceptions import CommandError
from datalad.support.exceptions import CommandNotAvailableError
Expand Down Expand Up @@ -204,6 +205,8 @@ def test_AnnexRepo_is_direct_mode_gitrepo(path):
assert_false(dm)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:473
@known_failure_windows
@assert_cwd_unchanged
@with_testrepos('.*annex.*', flavors=local_testrepo_flavors)
@with_tempfile
Expand Down Expand Up @@ -258,6 +261,8 @@ def raise_cmderror(*args, **kwargs):
assert_re_in(".*annex (find|get). needs 905.6 MB more", str(exc))


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:405
@known_failure_windows
@with_testrepos('basic_annex', flavors=['local'])
def test_AnnexRepo_get_remote_na(path):
ar = AnnexRepo(path)
Expand Down Expand Up @@ -733,6 +738,8 @@ def test_AnnexRepo_always_commit(path):
eq_(num_commits, 4)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:445
@known_failure_windows
@with_testrepos('basic_annex', flavors=['local'])
@with_tempfile
def test_AnnexRepo_on_uninited_annex(origin, path):
Expand Down Expand Up @@ -778,6 +785,8 @@ def test_AnnexRepo_commit(path):
assert_raises(FileNotInRepositoryError, ds.commit, files="not-existing")


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:295
@known_failure_windows
@with_testrepos('.*annex.*', flavors=['clone'])
def test_AnnexRepo_add_to_annex(path):

Expand Down Expand Up @@ -925,6 +934,8 @@ def test_v7_detached_get(opath, path):
#def init_remote(self, name, options):
#def enable_remote(self, name):

# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:348
@known_failure_windows
@with_testrepos('basic_annex$', flavors=['clone'])
@with_tempfile
def _test_AnnexRepo_get_contentlocation(batch, path, work_dir_outside):
Expand Down Expand Up @@ -1255,6 +1266,8 @@ def test_repo_version(path1, path2, path3):
eq_(version, 5)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:330
@known_failure_windows
@with_testrepos('.*annex.*', flavors=['clone'])
@with_tempfile(mkdir=True)
def test_annex_copy_to(origin, clone):
Expand Down Expand Up @@ -1691,6 +1704,8 @@ def test_AnnexRepo_flyweight(path1, path2):
assert_not_is_instance(repo4, AnnexRepo)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:417
@known_failure_windows
@with_testrepos(flavors=local_testrepo_flavors)
@with_tempfile(mkdir=True)
@with_tempfile
Expand Down Expand Up @@ -1968,6 +1983,8 @@ def test_AnnexRepo_get_tracking_branch(path):
eq_(('origin', 'refs/heads/master'), ar.get_tracking_branch())


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:433
@known_failure_windows
@with_testrepos('basic_annex', flavors=['clone'])
def test_AnnexRepo_is_managed_branch(path):

Expand Down
8 changes: 7 additions & 1 deletion datalad/support/tests/test_gitrepo.py
Expand Up @@ -47,7 +47,7 @@
from datalad.tests.utils import SkipTest
from datalad.tests.utils import skip_if
from datalad.tests.utils import skip_if_on_windows
from datalad.tests.utils import known_failure_githubci_win
from datalad.tests.utils import known_failure_windows
from datalad.tests.utils import integration
from datalad.utils import rmtree
from datalad.tests.utils_testrepos import BasicAnnexTestRepo
Expand Down Expand Up @@ -187,6 +187,8 @@ def test_GitRepo_equals(path1, path2):
ok_(repo1 != repo2)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:515
@known_failure_windows
@assert_cwd_unchanged
@with_testrepos('.*git.*', flavors=local_testrepo_flavors)
@with_tempfile
Expand Down Expand Up @@ -443,6 +445,8 @@ def test_GitRepo_remote_remove(orig_path, path):
assert_in('origin', out)


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:491
@known_failure_windows
@with_testrepos(flavors=local_testrepo_flavors)
@with_tempfile
def test_GitRepo_get_remote_url(orig_path, path):
Expand Down Expand Up @@ -765,6 +769,8 @@ def test_GitRepo_get_files(url, path):
eq_(set([filename]), branch_files.difference(local_files))


# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789014#step:8:505
@known_failure_windows
@with_testrepos('.*git.*', flavors=local_testrepo_flavors)
@with_tempfile(mkdir=True)
@with_tempfile
Expand Down
4 changes: 4 additions & 0 deletions datalad/tests/test_auto.py
Expand Up @@ -27,6 +27,7 @@
from .utils import with_tempfile
from .utils import SkipTest
from .utils import chpwd
from .utils import known_failure_windows
from datalad.support.json_py import LZMAFile

try:
Expand All @@ -40,8 +41,11 @@
except ImportError:
nib = None


# somewhat superseeded by test_proxying_open_regular but still does
# some additional testing, e.g. non-context manager style of invocation
# https://github.com/datalad/datalad/pull/3975/checks?check_run_id=369789030#step:8:398
@known_failure_windows
@with_testrepos('basic_annex', flavors=['clone'])
def test_proxying_open_testrepobased(repo):
TEST_CONTENT = "content to be annex-addurl'd"
Expand Down

0 comments on commit ecd6034

Please sign in to comment.