Files
pytest2/py/path/svn/testing/test_test_repo.py
hpk cc10d84088 [svn r58308] * de-generalize conditional skips and only care
nicely for common tedious causes of skipping:
  import a module and checking it has a certain
  version.  usage example:

  docutils = py.test.importorskip(docutils, minversion="0.4")

* used new helper and cleanup skipping logic in py lib

--HG--
branch : trunk
2008-09-21 17:15:28 +02:00

26 lines
693 B
Python

import py
from py.__.path.svn.testing.svntestbase import make_test_repo, getsvnbin
class TestMakeRepo(object):
def setup_class(cls):
getsvnbin()
cls.repo = make_test_repo()
cls.wc = py.path.svnwc(py.test.ensuretemp("test-wc").join("wc"))
def test_empty_checkout(self):
self.wc.checkout(self.repo)
assert len(self.wc.listdir()) == 0
def test_commit(self):
self.wc.checkout(self.repo)
p = self.wc.join("a_file")
p.write("test file")
p.add()
rev = self.wc.commit("some test")
assert p.info().rev == 1
assert rev == 1
rev = self.wc.commit()
assert rev is None