source: tailor/vcpx/tests/tailor.py @ 305

Revision 305, 808 bytes checked in by lele@…, 8 years ago (diff)

Explicitly license everything under GPL

Line 
1#! /usr/bin/python
2# -*- mode: python; coding: utf-8 -*-
3# :Progetto: vcpx -- Frontend specific tests
4# :Creato:   mar 03 ago 2004 01:53:21 CEST
5# :Autore:   Lele Gaifax <lele@nautilus.homeip.net>
6# :Licenza:  GNU General Public License
7#
8
9from unittest import TestCase, TestSuite
10from datetime import datetime
11from StringIO import StringIO
12from vcpx.tailor import relpathto
13
14class RelPathToTest(TestCase):
15    """Tests for the relpathto function"""
16
17    def testRelPathTo(self):
18        """Verify relpathto() computes right relative paths"""
19       
20        self.assertEqual(relpathto('project', '.'), 'project')
21        self.assertEqual(relpathto('project', 'sub/dir'), '../../project')
22        self.assertEqual(relpathto('/tmp/project', '/usr/tmp/dir'),
23                         '../../../tmp/project')
Note: See TracBrowser for help on using the repository browser.