robustiy some randomly failing tests
--HG-- branch : trunk
This commit is contained in:
parent
425e4849f3
commit
71e332c9c4
|
@ -147,7 +147,8 @@ def test_plugin_setuptools_entry_point_integration(py_setup, venv, tmpdir):
|
||||||
out = venv.pytest_getouterr("-h")
|
out = venv.pytest_getouterr("-h")
|
||||||
assert "testpluginopt" in out
|
assert "testpluginopt" in out
|
||||||
|
|
||||||
def test_cmdline_entrypoints():
|
def test_cmdline_entrypoints(monkeypatch):
|
||||||
|
monkeypatch.syspath_prepend(py.path.local(__file__).dirpath().dirpath())
|
||||||
from setup import cmdline_entrypoints
|
from setup import cmdline_entrypoints
|
||||||
versioned_scripts = ['py.test', 'py.which']
|
versioned_scripts = ['py.test', 'py.which']
|
||||||
unversioned_scripts = versioned_scripts + [ 'py.cleanup',
|
unversioned_scripts = versioned_scripts + [ 'py.cleanup',
|
||||||
|
|
|
@ -429,6 +429,7 @@ class SvnWCCommandPath(common.PathBase):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
strpath = property(lambda x: str(x.localpath), None, None, "string path")
|
strpath = property(lambda x: str(x.localpath), None, None, "string path")
|
||||||
|
rev = property(lambda x: x.info(usecache=0).rev, None, None, "revision")
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return self.localpath == getattr(other, 'localpath', None)
|
return self.localpath == getattr(other, 'localpath', None)
|
||||||
|
@ -796,7 +797,6 @@ recursively. """
|
||||||
raise py.error.ENOENT(self, "not a versioned resource:" +
|
raise py.error.ENOENT(self, "not a versioned resource:" +
|
||||||
" %s != %s" % (info.path, self.localpath))
|
" %s != %s" % (info.path, self.localpath))
|
||||||
cache.info[self] = info
|
cache.info[self] = info
|
||||||
self.rev = info.rev
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
def listdir(self, fil=None, sort=None):
|
def listdir(self, fil=None, sort=None):
|
||||||
|
|
|
@ -499,7 +499,9 @@ class TestPOSIXLocalPath:
|
||||||
# we could wait here but timer resolution is very
|
# we could wait here but timer resolution is very
|
||||||
# system dependent
|
# system dependent
|
||||||
path.read()
|
path.read()
|
||||||
|
time.sleep(0.01)
|
||||||
atime2 = path.atime()
|
atime2 = path.atime()
|
||||||
|
time.sleep(0.01)
|
||||||
duration = time.time() - now
|
duration = time.time() - now
|
||||||
assert (atime2-atime1) <= duration
|
assert (atime2-atime1) <= duration
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ def test_make_repo(path1, tmpdir):
|
||||||
repo = py.path.svnurl("file://%s" % repo)
|
repo = py.path.svnurl("file://%s" % repo)
|
||||||
wc = py.path.svnwc(tmpdir.join("wc"))
|
wc = py.path.svnwc(tmpdir.join("wc"))
|
||||||
wc.checkout(repo)
|
wc.checkout(repo)
|
||||||
assert wc.info().rev == 0
|
assert wc.rev == 0
|
||||||
assert len(wc.listdir()) == 0
|
assert len(wc.listdir()) == 0
|
||||||
p = wc.join("a_file")
|
p = wc.join("a_file")
|
||||||
p.write("test file")
|
p.write("test file")
|
||||||
|
|
Loading…
Reference in New Issue