~ubuntu-branches/ubuntu/karmic/pypy/karmic

« back to all changes in this revision

Viewing changes to py/path/svn/testing/test_test_repo.py

  • Committer: Bazaar Package Importer
  • Author(s): Alexandre Fayolle
  • Date: 2007-04-13 09:33:09 UTC
  • Revision ID: james.westby@ubuntu.com-20070413093309-yoojh4jcoocu2krz
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import py
 
2
from py.__.path.svn.testing.svntestbase import make_test_repo
 
3
 
 
4
 
 
5
if py.path.local.sysfind('svn') is None:
 
6
    py.test.skip("cannot test py.path.svn, 'svn' binary not found")
 
7
 
 
8
class TestMakeRepo(object):
 
9
    def setup_class(cls):
 
10
        cls.repo = make_test_repo()
 
11
        cls.wc = py.path.svnwc(py.test.ensuretemp("test-wc").join("wc"))
 
12
 
 
13
    def test_empty_checkout(self):
 
14
        self.wc.checkout(self.repo)
 
15
        assert len(self.wc.listdir()) == 0
 
16
 
 
17
    def test_commit(self):
 
18
        self.wc.checkout(self.repo)
 
19
        p = self.wc.join("a_file")
 
20
        p.write("test file")
 
21
        p.add()
 
22
        rev = self.wc.commit("some test")
 
23
        assert p.info().rev == 1
 
24
        assert rev == 1
 
25
        rev = self.wc.commit()
 
26
        assert rev is None
 
27