1
0
Fork 0

Adding upstream version 2.5.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:20:03 +01:00
parent 080d7f9289
commit bb6dbf8636
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
37 changed files with 457 additions and 213 deletions

View file

@ -45,20 +45,6 @@ xfailif_windows_no_ruby = pytest.mark.xfail(
xfailif_windows = pytest.mark.xfail(os.name == 'nt', reason='windows')
def supports_venv(): # pragma: no cover (platform specific)
try:
__import__('ensurepip')
__import__('venv')
return True
except ImportError:
return False
xfailif_no_venv = pytest.mark.xfail(
not supports_venv(), reason='Does not support venv module',
)
def run_opts(
all_files=False,
files=(),
@ -103,10 +89,12 @@ def cwd(path):
os.chdir(original_cwd)
def git_commit(*args, fn=cmd_output, msg='commit!', **kwargs):
def git_commit(*args, fn=cmd_output, msg='commit!', all_files=True, **kwargs):
kwargs.setdefault('stderr', subprocess.STDOUT)
cmd = ('git', 'commit', '--allow-empty', '--no-gpg-sign', '-a') + args
cmd = ('git', 'commit', '--allow-empty', '--no-gpg-sign', *args)
if all_files: # allow skipping `-a` with `all_files=False`
cmd += ('-a',)
if msg is not None: # allow skipping `-m` with `msg=None`
cmd += ('-m', msg)
ret, out, _ = fn(*cmd, **kwargs)