This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pathname breadcrumbs. Fix #130. Fixes 758628.
- Loading branch information
Showing
4 changed files
with
94 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Unit tests that don't fit anywhere else""" | ||
|
||
from unittest import TestCase | ||
|
||
from nose.tools import eq_ | ||
|
||
from dxr.build import linked_pathname | ||
|
||
|
||
class LinkedPathnameTests(TestCase): | ||
def test_deep_path(self): | ||
"""Make sure paths more than one level deep are linked correctly.""" | ||
eq_(linked_pathname('hey/thankyou', 'code'), | ||
[('/code/source', 'code'), | ||
('/code/source/hey', 'hey'), | ||
('/code/source/hey/thankyou', 'thankyou')]) | ||
|
||
def test_root_folder(self): | ||
"""Make sure the root folder is treated correctly.""" | ||
eq_(linked_pathname('', 'stuff'), [('/stuff/source', 'stuff')]) |