diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2013-04-16 22:49:37 +0200 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2013-04-16 22:49:37 +0200 |
commit | 9a95d7202b9aa2ede0a2d1248e3e1dfa0fd39a4e (patch) | |
tree | 2fada461830f3bb9e73d500fc67a8b7d174d6395 /testsuite | |
parent | 5f1cb6214179685456681f85caaa8b8eb665530d (diff) | |
download | pep8-9a95d7202b9aa2ede0a2d1248e3e1dfa0fd39a4e.tar.gz |
Give priority to --select over --ignore; issue #188
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/test_api.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/test_api.py b/testsuite/test_api.py index a31ff42..ab0497f 100644 --- a/testsuite/test_api.py +++ b/testsuite/test_api.py @@ -194,6 +194,18 @@ class APITestCase(unittest.TestCase): self.assertEqual(options.select, ('E', 'W')) self.assertEqual(options.ignore, ('',)) + options = parse_argv('--select E --ignore E24').options + self.assertEqual(options.select, ('E',)) + self.assertEqual(options.ignore, ('',)) + + options = parse_argv('--ignore E --select E24').options + self.assertEqual(options.select, ('E24',)) + self.assertEqual(options.ignore, ('',)) + + options = parse_argv('--ignore W --select E24').options + self.assertEqual(options.select, ('E24',)) + self.assertEqual(options.ignore, ('',)) + pep8style = pep8.StyleGuide(paths=[E11]) self.assertFalse(pep8style.ignore_code('E112')) self.assertFalse(pep8style.ignore_code('W191')) |