[svn r38207] revert 38182 and 38184 changes to ensuretemp()

because getpid() is different per thread
(and if e.g. run via execnet in threads ...
it creates new tempdirectories all the time)
let's consider this sometime else

--HG--
branch : trunk
This commit is contained in:
hpk
2007-02-08 21:31:50 +01:00
parent 499d60c8ab
commit ab6dded07a
2 changed files with 4 additions and 21 deletions
-15
View File
@@ -10,21 +10,6 @@ def test_tmpdir():
assert d1 == d2
assert d1.check(dir=1)
def test_ensuretemp_fork():
os = py.std.os
org_getpid = os.getpid
currpid = 0
def getpid():
return currpid
try:
os.getpid = getpid
d1 = py.test.ensuretemp('hello')
currpid = 1
d2 = py.test.ensuretemp('hello')
finally:
os.getpid = org_getpid
assert d1 != d2
def test_config_cmdline_options():
o = py.test.ensuretemp('configoptions')
o.ensure("conftest.py").write(py.code.Source("""