diff options
author | Guido Günther <agx@sigxcpu.org> | 2013-08-28 19:30:12 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-08-28 19:30:12 +0200 |
commit | c9d3d93d28f2a1f839770672f5846115d8d0e3c3 (patch) | |
tree | 2b0415593a8ad00a6110134dbdbaee7046481c01 /tests/test_Config.py | |
parent | 8f073ebccd35f331981c8e2a396c0999de25a0b2 (diff) |
Use open() instead of file()
since the later doesn't exist in python3
Diffstat (limited to 'tests/test_Config.py')
-rw-r--r-- | tests/test_Config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_Config.py b/tests/test_Config.py index 995d619..9a68f8c 100644 --- a/tests/test_Config.py +++ b/tests/test_Config.py @@ -71,7 +71,7 @@ def test_parser_fallback(): >>> tmpdir = str(context.new_tmpdir('foo')) >>> confname = os.path.join(tmpdir, 'gbp.conf') >>> parser.config_files = [confname] - >>> f = file(confname, 'w') + >>> f = open(confname, 'w') >>> f.write('[foo]\\nthere = is\\n[git-foo]\\nno = truth\\n') >>> f.close() >>> parser._parse_config_files() @@ -90,13 +90,13 @@ def test_filter(): >>> tmpdir = str(context.new_tmpdir('bar')) >>> confname = os.path.join(tmpdir, 'gbp.conf') >>> parser.config_files = [confname] - >>> f = file(confname, 'w') + >>> f = open(confname, 'w') >>> f.write('[bar]\\nfilter = asdf\\n') >>> f.close() >>> parser._parse_config_files() >>> parser.config['filter'] ['asdf'] - >>> f = file(confname, 'w') + >>> f = open(confname, 'w') >>> f.write("[bar]\\nfilter = ['this', 'is', 'a', 'list']\\n") >>> f.close() >>> parser._parse_config_files() |