/[navidoc]/navidoc/test/path.test
ViewVC logotype

Diff of /navidoc/test/path.test

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by humppake, Mon Jun 2 13:58:14 2003 UTC revision 1.2 by humppake, Fri Jun 27 13:17:00 2003 UTC
# Line 16  Line 16 
16  # MA  02111-1307  USA  # MA  02111-1307  USA
17  #    #  
18    
19    def test_slashify():
20        """Test slashifying a path."""
21        from navidoc.util.path import slashify
22        assert slashify('') == '', slashify('')
23        assert slashify('foo') == 'foo/', slashify('foo')
24        assert slashify('foo/') == 'foo/', slashify('foo/')
25    
26  def test_relative_path():  def test_relative_path():
27      """Test building of relative path."""      """Test building of relative path."""
28      from navidoc.util.path import relative_path      from navidoc.util.path import relative_path
29      assert relative_path('navidoc', 'test') == '../test/', relative_path('navidoc', 'test')      assert relative_path('navidoc', 'test') == '../test/', relative_path('navidoc', 'test')
30        assert relative_path('', 'test') == 'test', relative_path('', 'test')
31        assert relative_path('navidoc', 'Makefile') == '../Makefile', relative_path('navidoc', 'Makefile')
32        assert relative_path('navidoc/__init__.py', 'Makefile') == '../Makefile', relative_path('navidoc/__init__.py', 'Makefile')
33        assert relative_path('navidoc/util', 'test/path.test') == '../../test/path.test', relative_path('navidoc/util', 'test/path.test')

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26