mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
selftest: enable py3 for samba.tests.upgrade
`os.tempname` is removed in Python 3. Use `tempfile` instead. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
908ee2d3d2
commit
87743b3275
@ -19,6 +19,7 @@
|
||||
"""Samba Python tests."""
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
import ldb
|
||||
import samba
|
||||
from samba import param
|
||||
@ -254,7 +255,8 @@ class LdbTestCase(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(LdbTestCase, self).setUp()
|
||||
self.filename = os.tempnam()
|
||||
self.tempfile = tempfile.NamedTemporaryFile(delete=False)
|
||||
self.filename = self.tempfile.name
|
||||
self.ldb = samba.Ldb(self.filename)
|
||||
|
||||
def set_modules(self, modules=[]):
|
||||
|
@ -62,7 +62,7 @@ planpythontestsuite("none", "samba.tests.security", py3_compatible=True)
|
||||
planpythontestsuite("none", "samba.tests.dcerpc.misc", py3_compatible=True)
|
||||
planpythontestsuite("none", "samba.tests.dcerpc.integer")
|
||||
planpythontestsuite("none", "samba.tests.param", py3_compatible=True)
|
||||
planpythontestsuite("none", "samba.tests.upgrade")
|
||||
planpythontestsuite("none", "samba.tests.upgrade", py3_compatible=True)
|
||||
planpythontestsuite("none", "samba.tests.core", py3_compatible=True)
|
||||
planpythontestsuite("none", "samba.tests.common")
|
||||
planpythontestsuite("none", "samba.tests.provision", py3_compatible=True)
|
||||
|
Loading…
Reference in New Issue
Block a user