diff options
author | dol-sen <brian.dolbec@gmail.com> | 2011-09-23 23:03:26 -0700 |
---|---|---|
committer | dol-sen <brian.dolbec@gmail.com> | 2011-09-23 23:03:26 -0700 |
commit | 25ae8b28da0632ed33935e32071c9aa683814da2 (patch) | |
tree | e533ddec419bcbd808a4560ef0403f5908415026 /layman/dbbase.py | |
parent | f3e1976da8eeef942a95019669633255fa3b6c50 (diff) | |
download | layman-25ae8b28da0632ed33935e32071c9aa683814da2.tar.gz layman-25ae8b28da0632ed33935e32071c9aa683814da2.tar.bz2 layman-25ae8b28da0632ed33935e32071c9aa683814da2.zip |
make the tests more py3 compatibile.
Diffstat (limited to 'layman/dbbase.py')
-rw-r--r-- | layman/dbbase.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/layman/dbbase.py b/layman/dbbase.py index 149988b..461038b 100644 --- a/layman/dbbase.py +++ b/layman/dbbase.py @@ -195,7 +195,9 @@ class DbBase(object): ''' Write the list of overlays to a file. - >>> write = os.tmpnam() + >>> import tempfile + >>> tmpdir = tempfile.mkdtemp(prefix="laymantmp_") + >>> write = os.path.join(tmpdir, 'test.xml') >>> here = os.path.dirname(os.path.realpath(__file__)) >>> from layman.config import BareConfig >>> config = BareConfig() @@ -209,6 +211,7 @@ class DbBase(object): [u'wrobel-stable'] >>> os.unlink(write) + >>> os.rmdir(tmpdir) ''' tree = ET.Element('repositories', version="1.0") |