fix: test_run_with_user_global_config_file patched
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,3 +7,4 @@ __pycache__
|
|||||||
/.eggs
|
/.eggs
|
||||||
.venv
|
.venv
|
||||||
venv
|
venv
|
||||||
|
.coverage
|
||||||
|
|||||||
@@ -305,6 +305,9 @@ class CommandLineTestCase(unittest.TestCase):
|
|||||||
config = os.path.join(dir, 'config')
|
config = os.path.join(dir, 'config')
|
||||||
|
|
||||||
self.addCleanup(os.environ.update, HOME=os.environ['HOME'])
|
self.addCleanup(os.environ.update, HOME=os.environ['HOME'])
|
||||||
|
# remove other env vars to make sure we are using the HOME config file.
|
||||||
|
os.environ.pop('YAMLLINT_CONFIG_FILE', None)
|
||||||
|
os.environ.pop('XDG_CONFIG_HOME', None)
|
||||||
os.environ['HOME'] = home
|
os.environ['HOME'] = home
|
||||||
|
|
||||||
with open(config, 'w') as f:
|
with open(config, 'w') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user