python-GitPython/test-skips.patch
Matej Cepl 6eee14faa9 - Update to version 3.1.31.1676565040.f253335:
* prepare next release
  * Add test asserting that get_values works by itself
  * Update cmd.py
  * Fix RecursionError when iterating streams
  * Update docs
  * Add additional assertions to test_base.py
  * Updated diff test to use different similarity thresholds
  * Add check to test bare repo
  * Added diff test to disable rename detection
  * fixed lint error
  * Enable user to override default diff -M arg
  * Remove optional from two member variables
  * Fix timezone parsing functions for non-hour timezones
  * Raise exception if return code from check-ignore is not 1
  * Add test to verify GitCommandError is raised when check-ignore is run against a file behind a symlink
  * Add test_ignored_items_reported
  * Lint with Flake8 via pre-commit
  * Upgrade Python syntax with pyupgrade --py37-plus
  * Fix typo
  * Declare support for Python 3.11
  * fix files list on file rename
  * get_values eagerly loads sections before return
  * Fix some resource leaks by open file handles
  * fix clone_from_unsafe_protocol tests
  * replace tempfile.mkdtemp w/ tempfile.TemporaryDirectory
  * fix/add allow_unsafe_* params in docstrings + fix typo
  * tests: Use `command -v` instead of third-party `which` program
  * Fix Sphinx rendering errors
- Give up on tests for now, gh#gitpython-developers/GitPython#914

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=51
2023-05-11 17:33:37 +00:00

100 lines
4.8 KiB
Diff

---
test/test_base.py | 3 ++-
test/test_remote.py | 5 ++++-
test/test_repo.py | 1 +
test/test_submodule.py | 19 +++++++++++--------
4 files changed, 18 insertions(+), 10 deletions(-)
--- a/test/test_base.py
+++ b/test/test_base.py
@@ -109,7 +109,8 @@ class TestBase(_TestBase):
assert osp.isdir(osp.join(rw_repo.working_tree_dir, "lib"))
assert osp.isdir(rw_repo.working_dir)
- @skipIf(HIDE_WINDOWS_FREEZE_ERRORS, "FIXME: Freezes! sometimes...")
+ #@skipIf(HIDE_WINDOWS_FREEZE_ERRORS, "FIXME: Freezes! sometimes...")
+ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error')
@with_rw_and_rw_remote_repo("0.1.6")
def test_with_rw_remote_and_rw_repo(self, rw_repo, rw_remote_repo):
assert not rw_repo.config_reader("repository").getboolean("core", "bare")
--- 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
@@ -430,7 +431,8 @@ class TestRemote(TestBase):
TagReference.delete(rw_repo, new_tag, other_tag)
remote.push(":%s" % other_tag.path, kill_after_timeout=10.0)
- @skipIf(HIDE_WINDOWS_FREEZE_ERRORS, "FIXME: Freezes!")
+ #@skipIf(HIDE_WINDOWS_FREEZE_ERRORS, "FIXME: Freezes!")
+ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error')
@with_rw_and_rw_remote_repo("0.1.6")
def test_base(self, rw_repo, remote_repo):
num_remotes = 0
@@ -681,6 +683,7 @@ class TestRemote(TestBase):
# will raise fatal: Will not delete all non-push URLs
self.assertRaises(GitCommandError, remote.delete_url, test3)
+ @skipIf(os.environ.get('SKIP_GITHUB', 'false') == 'true', 'GitHub connection error')
def test_fetch_error(self):
rem = self.rorepo.remote("origin")
with self.assertRaisesRegex(GitCommandError, "[Cc]ouldn't find remote ref __BAD_REF__"):
--- a/test/test_repo.py
+++ b/test/test_repo.py
@@ -250,6 +250,7 @@ class TestRepo(TestBase):
except UnicodeEncodeError:
self.fail("Raised UnicodeEncodeError")
+ @skipIf(os.environ.get('SKIP_GITHUB', 'false') == 'true', 'Gitlab connection error')
@with_rw_directory
def test_leaking_password_in_clone_logs(self, rw_dir):
password = "fakepassword1234"
--- a/test/test_submodule.py
+++ b/test/test_submodule.py
@@ -453,14 +453,15 @@ class TestSubmodule(TestBase):
reason="Cygwin GitPython can't find submodule SHA",
raises=ValueError
)
- @skipIf(
- HIDE_WINDOWS_KNOWN_ERRORS,
- """
- File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute
- raise GitCommandNotFound(command, err)
- git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
- cmdline: git clone -n --shared -v C:\\projects\\gitpython\\.git Users\\appveyor\\AppData\\Local\\Temp\\1\\tmplyp6kr_rnon_bare_test_root_module""",
- ) # noqa E501
+ #@skipIf(
+ # HIDE_WINDOWS_KNOWN_ERRORS,
+ # """
+ # File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute
+ # raise GitCommandNotFound(command, err)
+ # git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
+ # cmdline: git clone -n --shared -v C:\\projects\\gitpython\\.git Users\\appveyor\\AppData\\Local\\Temp\\1\\tmplyp6kr_rnon_bare_test_root_module""",
+ #) # noqa E501
+ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error')
@with_rw_repo(k_subm_current, bare=False)
def test_root_module(self, rwrepo):
# Can query everything without problems
@@ -802,6 +803,7 @@ class TestSubmodule(TestBase):
# "FIXME: helper.wrapper fails with: PermissionError: [WinError 5] Access is denied: "
# "'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\test_work_tree_unsupportedryfa60di\\master_repo\\.git\\objects\\pack\\pack-bc9e0787aef9f69e1591ef38ea0a6f566ec66fe3.idx") # noqa E501
@with_rw_directory
+ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error')
def test_git_submodule_compatibility(self, rwdir):
parent = git.Repo.init(osp.join(rwdir, "parent"))
sm_path = join_path_native("submodules", "intermediate", "one")
@@ -887,6 +889,7 @@ class TestSubmodule(TestBase):
# end for each dry-run mode
@with_rw_directory
+ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error')
def test_remove_norefs(self, rwdir):
parent = git.Repo.init(osp.join(rwdir, "parent"))
sm_name = "mymodules/myname"