Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37856649
en ru br
Репозитории ALT

Группа :: Development/Python3
Пакет: python3-module-GitPython

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: python3-module-GitPython-3.1.32-alt.patch
Скачать


 .gitmodules               | 3 ---
 init-tests-after-clone.sh | 2 +-
 pyproject.toml            | 2 +-
 test/lib/helper.py        | 3 +++
 test/test_docs.py         | 4 ++++
 test/test_remote.py       | 4 ++++
 test/test_repo.py         | 9 +++++++++
 7 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/.gitmodules b/.gitmodules
index 251eeeec..e69de29b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +0,0 @@
-[submodule "gitdb"]
-	url = https://github.com/gitpython-developers/gitdb.git
-	path = git/ext/gitdb
diff --git a/init-tests-after-clone.sh b/init-tests-after-clone.sh
index e852f3cd..39bdcbd5 100755
--- a/init-tests-after-clone.sh
+++ b/init-tests-after-clone.sh
@@ -13,4 +13,4 @@ git reset --hard HEAD~1
 git reset --hard HEAD~1
 git reset --hard HEAD~1
 git reset --hard __testing_point__
-git submodule update --init --recursive
\ No newline at end of file
+# git submodule update --init --recursive
diff --git a/pyproject.toml b/pyproject.toml
index 0d5ebf01..077c7f89 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
 [tool.pytest.ini_options]
 python_files = 'test_*.py'
 testpaths = 'test'  # space separated list of paths from root e.g test tests doc/testing
-addopts = '--cov=git --cov-report=term --maxfail=10 --force-sugar --disable-warnings'
+addopts = '--maxfail=10 --disable-warnings'
 filterwarnings = 'ignore::DeprecationWarning'
 # --cov   coverage
 # --cov-report term  # send report to terminal term-missing -> terminal with line numbers  html  xml
diff --git a/test/lib/helper.py b/test/lib/helper.py
index c04c5cd9..4c6ed555 100644
--- a/test/lib/helper.py
+++ b/test/lib/helper.py
@@ -371,6 +371,9 @@ class TestBase(TestCase):
       of the project history ( to assure tests don't fail for others ).
     """
 
+    @skipIf(
+        os.environ.get("NO_SUBMODULES") is not None, "Requires gitdb submodule"
+    )
     def _small_repo_url(self):
         """:return" a path to a small, clonable repository"""
         from git.cmd import Git
diff --git a/test/test_docs.py b/test/test_docs.py
index 20027c19..b9bc4490 100644
--- a/test/test_docs.py
+++ b/test/test_docs.py
@@ -4,6 +4,7 @@
 #
 # This module is part of GitPython and is released under
 # the BSD License: http://www.opensource.org/licenses/bsd-license.php
+from unittest import skipIf
 import os
 import sys
 
@@ -483,6 +484,9 @@ class Tutorials(TestBase):
         reason="Cygwin GitPython can't find SHA for submodule",
         raises=ValueError
     )
+    @skipIf(
+        os.environ.get("NO_SUBMODULES") is not None, "Requires gitdb submodule"
+    )
     def test_submodules(self):
         # [1-test_submodules]
         repo = self.rorepo
diff --git a/test/test_remote.py b/test/test_remote.py
index 9636ca48..a1008ead 100644
--- a/test/test_remote.py
+++ b/test/test_remote.py
@@ -4,6 +4,7 @@
 # This module is part of GitPython and is released under
 # the BSD License: http://www.opensource.org/licenses/bsd-license.php
 
+import os
 import random
 import tempfile
 import pytest
@@ -681,6 +682,9 @@ class TestRemote(TestBase):
         # will raise fatal: Will not delete all non-push URLs
         self.assertRaises(GitCommandError, remote.delete_url, test3)
 
+    @skipIf(
+        os.environ.get("NO_INTERNET") is not None, "Required Internet"
+    )
     def test_fetch_error(self):
         rem = self.rorepo.remote("origin")
         with self.assertRaisesRegex(GitCommandError, "[Cc]ouldn't find remote ref __BAD_REF__"):
diff --git a/test/test_repo.py b/test/test_repo.py
index 5c66aeeb..668fbc40 100644
--- a/test/test_repo.py
+++ b/test/test_repo.py
@@ -250,6 +250,9 @@ class TestRepo(TestBase):
             except UnicodeEncodeError:
                 self.fail("Raised UnicodeEncodeError")
 
+    @skipIf(
+        os.environ.get("NO_INTERNET") is not None, "Required Internet"
+    )
     @with_rw_directory
     def test_leaking_password_in_clone_logs(self, rw_dir):
         password = "fakepassword1234"
@@ -1116,6 +1119,9 @@ class TestRepo(TestBase):
         reason="Cygwin GitPython can't find submodule SHA",
         raises=ValueError
     )
+    @skipIf(
+        os.environ.get("NO_SUBMODULES") is not None, "Requires gitdb submodule"
+    )
     def test_submodules(self):
         self.assertEqual(len(self.rorepo.submodules), 1)  # non-recursive
         self.assertGreaterEqual(len(list(self.rorepo.iter_submodules())), 2)
@@ -1124,6 +1130,9 @@ class TestRepo(TestBase):
         self.assertRaises(ValueError, self.rorepo.submodule, "doesn't exist")
 
     @with_rw_repo("HEAD", bare=False)
+    @skipIf(
+        os.environ.get("NO_SUBMODULES") is not None, "Requires gitdb submodule"
+    )
     def test_submodule_update(self, rwrepo):
         # fails in bare mode
         rwrepo._bare = True
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin