summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_Config.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_Config.py b/tests/test_Config.py
index 046af278..6750d844 100644
--- a/tests/test_Config.py
+++ b/tests/test_Config.py
@@ -65,21 +65,21 @@ def test_filter():
The filter option should always parse as a list
>>> import os
>>> from gbp.config import GbpOptionParser
- >>> parser = GbpOptionParser('bar')
>>> tmpdir = str(context.new_tmpdir('bar'))
>>> confname = os.path.join(tmpdir, 'gbp.conf')
- >>> parser.config_files = [confname]
>>> f = open(confname, 'w')
>>> f.write('[bar]\\nfilter = asdf\\n')
>>> f.close()
- >>> parser.parse_config_files()
+ >>> os.environ['GBP_CONF_FILES'] = confname
+ >>> parser = GbpOptionParser('bar')
>>> parser.config['filter']
['asdf']
>>> f = open(confname, 'w')
>>> f.write("[bar]\\nfilter = ['this', 'is', 'a', 'list']\\n")
>>> f.close()
- >>> parser.parse_config_files()
+ >>> parser = GbpOptionParser('bar')
>>> parser.config['filter']
['this', 'is', 'a', 'list']
+ >>> del os.environ['GBP_CONF_FILES']
"""