a few internal test related fixes as to run on a osx/no-execnet situation
--HG-- branch : trunk
This commit is contained in:
parent
f4ec2d1ecd
commit
1a86d09da4
|
@ -90,11 +90,7 @@ complete code and documentation source with mercurial_::
|
|||
|
||||
hg clone https://bitbucket.org/hpk42/py-trunk/
|
||||
|
||||
Development usually takes place on the 'trunk' branch.
|
||||
|
||||
.. There also is a readonly subversion
|
||||
checkout available which contains the latest release::
|
||||
svn co https://codespeak.net/svn/py/dist
|
||||
Development takes place on the 'trunk' branch.
|
||||
|
||||
You can also go to the python package index and
|
||||
download and unpack a TAR file::
|
||||
|
|
|
@ -18,4 +18,5 @@ def pytest_funcarg__tmpdir(request):
|
|||
path object.
|
||||
"""
|
||||
name = request.function.__name__
|
||||
return request.config.mktemp(name, numbered=True)
|
||||
x = request.config.mktemp(name, numbered=True)
|
||||
return x.realpath()
|
||||
|
|
|
@ -15,23 +15,6 @@ def pytest_funcarg__path1(request):
|
|||
assert path1.join("samplefile").check()
|
||||
return request.cached_setup(setup, teardown, scope="session")
|
||||
|
||||
def pytest_funcarg__tmpdir(request):
|
||||
basedir = request.config.getbasetemp()
|
||||
if request.cls:
|
||||
try:
|
||||
basedir = basedir.mkdir(request.cls.__name__)
|
||||
except py.error.EEXIST:
|
||||
pass
|
||||
for i in range(1000):
|
||||
name = request.function.__name__
|
||||
if i > 0:
|
||||
name += str(i)
|
||||
try:
|
||||
return basedir.mkdir(name)
|
||||
except py.error.EEXIST:
|
||||
continue
|
||||
raise ValueError("could not create tempdir")
|
||||
|
||||
class TestLocalPath(common.CommonFSTests):
|
||||
def test_join_normpath(self, tmpdir):
|
||||
assert tmpdir.join(".") == tmpdir
|
||||
|
|
|
@ -133,8 +133,8 @@ class TestPerTestCapturing:
|
|||
"setup test_func1*",
|
||||
"in func1*",
|
||||
"setup test_func2*",
|
||||
"in func2*",
|
||||
])
|
||||
"in func2*",
|
||||
])
|
||||
|
||||
@py.test.mark.xfail
|
||||
def test_capture_scope_cache(self, testdir):
|
||||
|
|
|
@ -28,12 +28,7 @@ def test_importall():
|
|||
base = py._impldir
|
||||
nodirs = [
|
||||
base.join('test', 'testing', 'data'),
|
||||
base.join('test', 'web'),
|
||||
base.join('path', 'gateway',),
|
||||
base.join('doc',),
|
||||
base.join('rest', 'directive.py'),
|
||||
base.join('test', 'testing', 'import_test'),
|
||||
base.join('bin'),
|
||||
base.join('code', 'oldmagic.py'),
|
||||
base.join('execnet', 'script'),
|
||||
base.join('compat', 'testing'),
|
||||
|
@ -46,6 +41,11 @@ def test_importall():
|
|||
def recurse(p):
|
||||
return p.check(dotfile=0) and p.basename != "attic"
|
||||
|
||||
try:
|
||||
import execnet
|
||||
except ImportError:
|
||||
execnet = None
|
||||
|
||||
for p in base.visit('*.py', recurse):
|
||||
if p.basename == '__init__.py':
|
||||
continue
|
||||
|
@ -57,6 +57,10 @@ def test_importall():
|
|||
else:
|
||||
relpath = relpath.replace(base.sep, '.')
|
||||
modpath = 'py.impl.%s' % relpath
|
||||
if modpath.startswith("py.impl.test.dist") or \
|
||||
modpath.startswith("py.impl.test.looponfail"):
|
||||
if not execnet:
|
||||
continue
|
||||
check_import(modpath)
|
||||
|
||||
def check_import(modpath):
|
||||
|
|
Loading…
Reference in New Issue