# HG changeset patch
# User Manuel Jacob <[email protected]>
# Date 1680139355 -7200
# Thu Mar 30 03:22:35 2023 +0200
# Branch stable
# Node ID e9a574cea28a8db42ff6a84a41a91b6cbe336cbc
# Parent 846ca7f28bd40e07c76ed259ce96a31a85d0c4ea
# EXP-Topic tests-git
tests: prevent Git system and global configuration from loading
This reduces differences between different testing environments. Something
similar is already done for Mercurial (in the lines directly above this
change).
Git’s documentation explicitly mentions that passing a value of /dev/null skips
reading the respective file.
diff --git a/kallithea/tests/other/test_vcs_operations.py
b/kallithea/tests/other/test_vcs_operations.py
--- a/kallithea/tests/other/test_vcs_operations.py
+++ b/kallithea/tests/other/test_vcs_operations.py
@@ -150,6 +150,8 @@
testenv['LANGUAGE'] = 'en_US:en'
testenv['HGPLAIN'] = ''
testenv['HGRCPATH'] = ''
+ testenv['GIT_CONFIG_SYSTEM'] = '/dev/null'
+ testenv['GIT_CONFIG_GLOBAL'] = '/dev/null'
testenv.update(environ)
p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, cwd=self.cwd,
env=testenv)
stdout, stderr = p.communicate()
_______________________________________________
kallithea-general mailing list
[email protected]
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general