| 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 | |
|---|
| 9 | from unittest import TestCase, TestSuite |
|---|
| 10 | from datetime import datetime |
|---|
| 11 | from StringIO import StringIO |
|---|
| 12 | from vcpx.tailor import relpathto |
|---|
| 13 | |
|---|
| 14 | class 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.