def test_getrev(): |
if not py.path.local(py.__file__).dirpath('.svn').check(): |
-> py.test.skip("py package is not a svn checkout") |
d = py.__package__.getrev() |
svnversion = py.path.local.sysfind('svnversion') |
if svnversion is None: |
py.test.skip("cannot test svnversion, 'svnversion' binary not found") |
v = svnversion.sysexec(py.path.local(py.__file__).dirpath()) |
assert v.startswith(str(d)) |