RonnyPfannschmidt / anyvc

generic vcs abstraction (used in pida)

Clone this repository (size: 300.7 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/RonnyPfannschmidt/anyvc/

Changed (Δ98 bytes):

raw changeset »

tests/workdir/test_stated_path.py (9 lines added, 10 lines removed)

Up to file-list tests/workdir/test_stated_path.py:

1
1
# copyright 2008 by Ronny Pfannschmidt
2
# license lgpl3 or later
3
"""
4
>>> StatedPath('a').abspath
5
>>> StatedPath('a', base='b').abspath
6
'b/a'
7
>>> StatedPath('a')
8
<normal 'a'>
9
>>> StatedPath('./a')
10
<normal 'a'>
11
"""
12
2
from anyvc.common.workdir import StatedPath
13
3
4
def test_no_abspath():
5
    assert StatedPath('a').abspath is None
6
7
def test_base_to_abspath():
8
    assert StatedPath('a', base='b').abspath == 'b/a'
9
10
def test_repr():
11
    assert repr(StatedPath('a')) == "<normal 'a'>"
12
    assert repr(StatedPath('./a')) == "<normal 'a'>"