diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-01-21 16:44:20 +1300 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-01-21 16:44:20 +1300 |
commit | 14b0fed96c5d5acf9118156d29e469aed584c33d (patch) | |
tree | bc4e1aedd055a9183e18f8939e1eef3d8b3f2c0e /source4 | |
parent | 253a232d300ac6a508983bbbb6eb6d0235d48722 (diff) | |
download | samba-14b0fed96c5d5acf9118156d29e469aed584c33d.tar.gz samba-14b0fed96c5d5acf9118156d29e469aed584c33d.tar.bz2 samba-14b0fed96c5d5acf9118156d29e469aed584c33d.zip |
pyxattr: Fix tests by avoiding opening tdb files multiple times.
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/samba/tests/xattr.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/scripting/python/samba/tests/xattr.py b/source4/scripting/python/samba/tests/xattr.py index 15f2566ff1..41a22b7706 100644 --- a/source4/scripting/python/samba/tests/xattr.py +++ b/source4/scripting/python/samba/tests/xattr.py @@ -29,8 +29,8 @@ import sys class XattrTests(TestCase): def test_set_xattr_native(self): - if samba.xattr_native.is_xattr_supported(): - random.seed() + if samba.xattr_native.is_xattr_supported(): + random.seed() path=os.environ['SELFTEST_PREFIX'] tempf=os.path.join(path,"pytests"+str(int(100000*random.random()))) ntacl=xattr.NTACL() @@ -41,12 +41,12 @@ class XattrTests(TestCase): except IOError: print >>sys.stderr, "WARNING: the filesystem where the tests are runned do not support XATTR, tests SKIPED" os.unlink(tempf) - else: - print >>sys.stderr, "WARNING: the filesystem where the tests are runned do not support XATTR, tests SKIPED" + else: + print >>sys.stderr, "WARNING: the filesystem where the tests are runned do not support XATTR, tests SKIPED" def test_set_and_get_native(self): - if samba.xattr_native.is_xattr_supported(): - random.seed() + if samba.xattr_native.is_xattr_supported(): + random.seed() path = os.environ['SELFTEST_PREFIX'] tempf=os.path.join(path,"pytests"+str(int(100000*random.random()))) reftxt="this is a test" @@ -58,8 +58,8 @@ class XattrTests(TestCase): except IOError: print >>sys.stderr,"WARNING: the filesystem where the tests are runned do not support XATTR, tests SKIPED" os.unlink(tempf) - else: - print >>sys.stderr,"WARNING: the filesystem where the tests are runned do not support XATTR, tests SKIPED" + else: + print >>sys.stderr,"WARNING: the filesystem where the tests are runned do not support XATTR, tests SKIPED" def test_set_xattr_tdb(self): path=os.environ['SELFTEST_PREFIX'] |