Skip to content

Commit

Permalink
Add (skipped) test for #496
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsyo committed Feb 25, 2015
1 parent 65a88e2 commit ccbe907
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,22 @@ def test_destination_with_empty_final_component(self):
self.assertEqual(self.i.destination(),
np('base/one/_.mp3'))

@unittest.skip('unimplemented: #496')
def test_truncation_does_not_conflict_with_replacement(self):
# Use a replacement that should always replace the last X in any
# path component with a Z.
self.lib.replacements = [
(re.compile(r'X$'), u'Z'),
]

# Construct an item whose untruncated path ends with a Y but whose
# truncated version ends with an X.
self.i.title = 'X' * 300 + 'Y'

# The final path should reflect the replacement.
dest = self.i.destination()
self.assertTrue('XZ' in dest)


class ItemFormattedMappingTest(_common.LibTestCase):
def test_formatted_item_value(self):
Expand Down

0 comments on commit ccbe907

Please sign in to comment.