commit: f61e8653c46fe69079bd62db3023a945d8e48b63 Author: Horea Christian <chr <AT> chymera <DOT> eu> AuthorDate: Sat Jul 23 12:08:31 2022 +0000 Commit: Horea Christian <horea.christ <AT> gmail <DOT> com> CommitDate: Sat Jul 23 12:09:54 2022 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=f61e8653
dev-vcs/datalad: version bump and test fixes Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Horea Christian <chr <AT> chymera.eu> dev-vcs/datalad/datalad-0.17.0.ebuild | 18 ++- ...datalad-0.17.0.ebuild => datalad-0.17.2.ebuild} | 20 +-- dev-vcs/datalad/files/datalad-0.17.0-skip.patch | 162 +++++++++++++++++++++ 3 files changed, 182 insertions(+), 18 deletions(-) diff --git a/dev-vcs/datalad/datalad-0.17.0.ebuild b/dev-vcs/datalad/datalad-0.17.0.ebuild index 26c601617..4fb1d3de1 100644 --- a/dev-vcs/datalad/datalad-0.17.0.ebuild +++ b/dev-vcs/datalad/datalad-0.17.0.ebuild @@ -60,14 +60,16 @@ DEPEND=" # Noticed by upstream: # https://github.com/datalad/datalad/issues/6623 -#PATCHES=( "${FILESDIR}/${PN}-0.16.1-input.patch" ) +PATCHES=( "${FILESDIR}/${PN}-0.17.0-skip.patch" ) distutils_enable_tests pytest -#python_test() { -# export DATALAD_TESTS_NONETWORK=1 -# epytest -# #${EPYTHON} -m nose -s -v -A "not(integration or usecase or slow or network or turtle)" datalad || die -# # Full test suite takes for ever: -# # ${EPYTHON} -m nose -s -v datalad || die -#} +python_test() { + local -x DATALAD_TESTS_NONETWORK=1 + #export DATALAD_TESTS_NONETWORK=1 + epytest -k "not turtle and not slow and not usecase" + #epytest -k "not turtle" + #${EPYTHON} -m nose -s -v -A "not(integration or usecase or slow or network or turtle)" datalad || die + # Full test suite takes for ever: + # ${EPYTHON} -m nose -s -v datalad || die +} diff --git a/dev-vcs/datalad/datalad-0.17.0.ebuild b/dev-vcs/datalad/datalad-0.17.2.ebuild similarity index 81% copy from dev-vcs/datalad/datalad-0.17.0.ebuild copy to dev-vcs/datalad/datalad-0.17.2.ebuild index 26c601617..753985ef6 100644 --- a/dev-vcs/datalad/datalad-0.17.0.ebuild +++ b/dev-vcs/datalad/datalad-0.17.2.ebuild @@ -58,16 +58,16 @@ DEPEND=" ) " -# Noticed by upstream: -# https://github.com/datalad/datalad/issues/6623 -#PATCHES=( "${FILESDIR}/${PN}-0.16.1-input.patch" ) +EPYTEST_DESELECT=( + # Reported upstream: https://github.com/datalad/datalad/issues/6870 + datalad/distributed/tests/test_ria_basics.py::test_version_check + datalad/local/tests/test_gitcredential.py::test_datalad_credential_helper +) distutils_enable_tests pytest -#python_test() { -# export DATALAD_TESTS_NONETWORK=1 -# epytest -# #${EPYTHON} -m nose -s -v -A "not(integration or usecase or slow or network or turtle)" datalad || die -# # Full test suite takes for ever: -# # ${EPYTHON} -m nose -s -v datalad || die -#} +python_test() { + local -x DATALAD_TESTS_NONETWORK=1 + # see test groups in "tox.ini" + epytest -k "not turtle and not slow and not usecase" +} diff --git a/dev-vcs/datalad/files/datalad-0.17.0-skip.patch b/dev-vcs/datalad/files/datalad-0.17.0-skip.patch new file mode 100644 index 000000000..33b2d6f63 --- /dev/null +++ b/dev-vcs/datalad/files/datalad-0.17.0-skip.patch @@ -0,0 +1,162 @@ +--- a/datalad/tests/utils_pytest.py 2022-07-08 01:32:06.000000000 -0400 ++++ b/datalad/tests/utils_pytest.py 2022-07-21 05:07:09.341386460 -0400 +@@ -209,7 +209,7 @@ + try: + imp = __import__(module) + except Exception as exc: +- pytest.skip("Module %s fails to load" % module) ++ pytest.skip("Module %s fails to load" % module, allow_module_level=True) + + + def skip_if_scrapy_without_selector(): +@@ -220,7 +220,9 @@ + except ImportError: + pytest.skip( + "scrapy misses Selector (too old? version: %s)" +- % getattr(scrapy, '__version__')) ++ % getattr(scrapy, '__version__'), ++ allow_module_level=True, ++ ) + + + def skip_if_url_is_not_available(url, regex=None): +@@ -231,9 +233,11 @@ + try: + content = providers.fetch(url) + if regex and re.search(regex, content): +- pytest.skip("%s matched %r -- skipping the test" % (url, regex)) ++ pytest.skip("%s matched %r -- skipping the test" % (url, regex), ++ allow_module_level=True, ++ ) + except DownloadError: +- pytest.skip("%s failed to download" % url) ++ pytest.skip("%s failed to download" % url, allow_module_level=True) + + + def check_not_generatorfunction(func): +@@ -252,7 +256,9 @@ + + def check_and_raise(): + if dl_cfg.get('datalad.tests.nonetwork'): +- pytest.skip("Skipping since no network settings") ++ pytest.skip("Skipping since no network settings", ++ allow_module_level=True, ++ ) + + if func: + @wraps(func) +@@ -273,7 +279,7 @@ + + def check_and_raise(): + if on_windows: +- pytest.skip("Skipping on Windows") ++ pytest.skip("Skipping on Windows", allow_module_level=True) + + if func: + @wraps(func) +@@ -296,7 +302,9 @@ + + def check_and_raise(): + if hasattr(os, "geteuid") and os.geteuid() == 0: +- pytest.skip("Skipping: test assumptions fail under root") ++ pytest.skip("Skipping: test assumptions fail under root", ++ allow_module_level=True, ++ ) + + if func: + @wraps(func) +@@ -333,7 +341,9 @@ + def _wrap_skip_if(*args, **kwargs): + if cond: + if method == 'raise': +- pytest.skip(msg if msg else "condition was True") ++ pytest.skip(msg if msg else "condition was True", ++ allow_module_level=True, ++ ) + elif method == 'pass': + print(msg if msg else "condition was True") + return +@@ -375,7 +385,7 @@ + @skip_ssh + def _wrap_skip_nomultiplex_ssh(*args, **kwargs): + if SSHManager is not MultiplexSSHManager: +- pytest.skip("SSH without multiplexing is used") ++ pytest.skip("SSH without multiplexing is used", allow_module_level=True) + return func(*args, **kwargs) + return _wrap_skip_nomultiplex_ssh + +@@ -784,7 +794,7 @@ + port = queue.get(timeout=300) + except multiprocessing.queues.Empty as e: + if self.use_ssl: +- pytest.skip('No working SSL support') ++ pytest.skip('No working SSL support', allow_module_level=True) + else: + raise + self.url = 'http{}://{}:{}/'.format( +@@ -822,7 +832,7 @@ + #except requests.exceptions.SSLError as e: + except Exception as e: + self.stop() +- pytest.skip('No working HTTPS setup') ++ pytest.skip('No working HTTPS setup', allow_module_level=True) + # now verify that the stdlib tooling also works + # if this fails, check datalad/tests/ca/prov.sh + # for info on deploying a datalad-root.crt +@@ -843,7 +853,7 @@ + #except URLError as e: + except Exception as e: + self.stop() +- pytest.skip('No working HTTPS setup') ++ pytest.skip('No working HTTPS setup', allow_module_level=True) + + def stop(self): + """Stop serving `path`. +@@ -911,7 +921,7 @@ + @attr('without_http_proxy') + def _wrap_without_http_proxy(*args, **kwargs): + if on_windows: +- pytest.skip('Unclear why this is not working on windows') ++ pytest.skip('Unclear why this is not working on windows', allow_module_level=True) + # Such tests don't require real network so if http_proxy settings were + # provided, we remove them from the env for the duration of this run + env = os.environ.copy() +@@ -1246,7 +1256,9 @@ + assert(testrepos_uris) + else: + if not testrepos_uris: +- pytest.skip("No non-networked repos to test on") ++ pytest.skip("No non-networked repos to test on", ++ allow_module_level=True, ++ ) + + fake_dates = dl_cfg.get("datalad.fake-dates") + ntested = 0 +@@ -1298,7 +1310,7 @@ + # https://git-annex.branchable.com/bugs/Recent_hang_with_rsync_remote_with_older_systems___40__Xenial__44___Jessie__41__/ + if external_versions['cmd:system-ssh'] < '7.4' and \ + '8.20200522' < external_versions['cmd:annex'] < '8.20200720': +- pytest.skip("Test known to hang") ++ pytest.skip("Test known to hang", allow_module_level=True) + + sr_path, repo_path = args[-2:] + fn_args = args[:-2] +@@ -2089,7 +2101,7 @@ + _TESTS_ADJUSTED_TMPDIR = _check() + + if _TESTS_ADJUSTED_TMPDIR: +- pytest.skip("Test incompatible with adjusted branch default") ++ pytest.skip("Test incompatible with adjusted branch default", allow_module_level=True) + return func(*args, **kwargs) + return _wrap_skip_if_adjusted_branch + +@@ -2134,7 +2146,9 @@ + + if port is None: + pytest.skip("port for {} could not be determined: {}" +- .format(host, err)) ++ .format(host, err), ++ allow_module_level=True, ++ ) + return port +