diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2014-04-03 00:32:28 +0200 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2014-04-03 00:32:28 +0200 |
commit | f01edd687c32d457a7961e048f7068c96b20d8ea (patch) | |
tree | af69fbf4968e51a2c0b056956e90d74644b8381e /testsuite | |
parent | d0df292cb78cbd565d96cbfc92baa42cd85b3015 (diff) | |
download | pep8-f01edd687c32d457a7961e048f7068c96b20d8ea.tar.gz |
Fix false positive E121/E126 with multi-line string; issue #265
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/E12not.py | 12 | ||||
-rw-r--r-- | testsuite/test_shell.py | 8 |
2 files changed, 17 insertions, 3 deletions
diff --git a/testsuite/E12not.py b/testsuite/E12not.py index 733b424..a53d9a4 100644 --- a/testsuite/E12not.py +++ b/testsuite/E12not.py @@ -632,3 +632,15 @@ some_hash = { else 0, } # +from textwrap import dedent + + +print dedent( + ''' + mkdir -p ./{build}/ + mv ./build/ ./{build}/%(revision)s/ + '''.format( + build='build', + # more stuff + ) +) diff --git a/testsuite/test_shell.py b/testsuite/test_shell.py index 0313c0c..66d4174 100644 --- a/testsuite/test_shell.py +++ b/testsuite/test_shell.py @@ -82,9 +82,11 @@ class ShellTestCase(unittest.TestCase): self.assertEqual(x, str(num)) self.assertEqual(y, str(col)) self.assertTrue(msg.startswith(' E11')) - # Config file read from the pep8's tox.ini - (config_filename,) = self._config_filenames - self.assertTrue(config_filename.endswith('tox.ini')) + # Config file read from the pep8's setup.cfg or tox.ini + config_filenames = self._config_filenames + self.assertEqual(len(config_filenames), 2) + self.assertTrue(config_filenames[0].endswith('setup.cfg')) + self.assertTrue(config_filenames[1].endswith('tox.ini')) def test_check_stdin(self): pep8.PROJECT_CONFIG = () |