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 (
