From: Yaroslav Halchenko <debian@onerussian.com>
Subject: skip github tests if github fails to import

    Relevant only for backports for buster and nd18.04 -
    somehow backports of python3-github lack autodeduced
    dependency on python3-deprecated, and then import
    fails.  I think it is not worth the upstream patch.

Origin: NeuroDebian
Last-Update: 2021-04-29

--- a/datalad/support/tests/test_github_.py
+++ b/datalad/support/tests/test_github_.py
@@ -9,9 +9,13 @@
 """Tests for github helpers"""
 
 import logging
+import unittest
 import unittest.mock as mock
 
-import github as gh
+try:
+    import github as gh
+except ImportError as exc:
+    raise unittest.SkipTest(str(exc))
 
 from datalad.support.exceptions import AccessDeniedError
 from datalad.tests.utils import (
@@ -142,4 +146,4 @@ def test__gen_github_entity_organization
     repos = list(org.get_repos())
     repos_names = [r.name for r in repos]
     assert_greater(len(repos), 3)  # we have a number of those
-    assert_in('datasets.datalad.org', repos_names)
\ No newline at end of file
+    assert_in('datasets.datalad.org', repos_names)
