diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-14 23:33:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 23:33:52 -0500 |
commit | bc2f4c3450787654c955c7b4ce08d98f1f168e70 (patch) | |
tree | 8c99f5017ce56c6bae36091323360e7cbee81a34 /python/tidy/servo_tidy_tests/test_tidy.py | |
parent | 40e2b7d674531a36af1f96ac079e036dcaf1304f (diff) | |
parent | 28312d0e17f0e19a5999a3faed6c03d43db72b06 (diff) | |
download | servo-bc2f4c3450787654c955c7b4ce08d98f1f168e70.tar.gz servo-bc2f4c3450787654c955c7b4ce08d98f1f168e70.zip |
Auto merge of #11621 - h4xr:mach_fix, r=Wafflespeanut
Make mach test-tidy consider ignored dirs
Made changes so that mach test-tidy considers the ignored directories
Fixes #11386
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11621)
<!-- Reviewable:end -->
Diffstat (limited to 'python/tidy/servo_tidy_tests/test_tidy.py')
-rw-r--r-- | python/tidy/servo_tidy_tests/test_tidy.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index a50532fbade..4b271ce993c 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -114,6 +114,16 @@ class CheckTidiness(unittest.TestCase): self.assertEqual(msg, errors.next()[2]) self.assertNoMoreErrors(errors) + def test_file_list(self): + base_path='./python/tidy/servo_tidy_tests/test_ignored' + file_list = tidy.get_file_list(base_path, only_changed_files=False, + exclude_dirs=[]) + lst = list(file_list) + self.assertEqual([os.path.join(base_path, 'whee', 'test.rs')], lst) + file_list = tidy.get_file_list(base_path, only_changed_files=False, + exclude_dirs=[os.path.join(base_path,'whee')]) + lst = list(file_list) + self.assertEqual([], lst) def do_tests(): suite = unittest.TestLoader().loadTestsFromTestCase(CheckTidiness) |