Skip to content

Commit

Permalink
Keep the indentation visually clear in the test.
Browse files Browse the repository at this point in the history
Remove leading whitespace programmatically with textwrap.dedent.
  • Loading branch information
mauritsvanrees committed Oct 7, 2013
1 parent 6560439 commit 3a5afc6
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import shutil
import subprocess
import tempfile
import textwrap
import unittest


Expand Down Expand Up @@ -231,18 +232,21 @@ def test_get_ignore_from_manifest(self):
self.assertEqual(parse('prune dir'),
(['dir', 'dir/*'], []))
text = """
#exclude *.01
exclude *.02
exclude *.03 04.* bar.txt
exclude *.05
exclude some/directory/*.cfg
global-exclude *.10 *.11
global-exclude *.12
include *.20
prune 30
recursive-exclude 40 *.41
recursive-exclude 42 *.43 44.*
"""
#exclude *.01
exclude *.02
exclude *.03 04.* bar.txt
exclude *.05
exclude some/directory/*.cfg
global-exclude *.10 *.11
global-exclude *.12
include *.20
prune 30
recursive-exclude 40 *.41
recursive-exclude 42 *.43 44.*
"""
# Keep the indentation visually clear in the test, but remove
# leading whitespace programmatically.
text = textwrap.dedent(text)
self.assertEqual(
parse(text),
([
Expand Down

0 comments on commit 3a5afc6

Please sign in to comment.