diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2010-07-14 14:32:37 -0300 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2010-07-14 14:32:37 -0300 |
commit | 7731efe7f817ba53e033a551e3f3902e4b20f91d (patch) | |
tree | b8348a829eda0defe4cf681444e62e454d7ea346 /tests | |
parent | fixed all the modules that deal with files, to work properly with py3k (diff) | |
download | g-octave-7731efe7f817ba53e033a551e3f3902e4b20f91d.tar.gz g-octave-7731efe7f817ba53e033a551e3f3902e4b20f91d.tar.bz2 g-octave-7731efe7f817ba53e033a551e3f3902e4b20f91d.zip |
ported the test suite to py3k
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utils.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/utils.py b/tests/utils.py index 1192573..13caa19 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -11,7 +11,12 @@ :license: GPL-2, see LICENSE for more details. """ -import ConfigParser +from g_octave.compat import py3k, open + +if py3k: + import configparser +else: + import ConfigParser as configparser import os import shutil import tempfile @@ -29,7 +34,7 @@ def create_env(json_files=False): db = os.path.join(current_dir, 'files') overlay = os.path.join(directory, 'overlay') - cp = ConfigParser.ConfigParser() + cp = configparser.ConfigParser() cp.add_section('main') cp.set('main', 'db', db) cp.set('main', 'overlay', overlay) |