From 28312d0e17f0e19a5999a3faed6c03d43db72b06 Mon Sep 17 00:00:00 2001 From: Saurabh Badhwar Date: Sun, 5 Jun 2016 19:07:34 +0530 Subject: Make mach consider ignored dirs Address indentation changes --- python/tidy/servo_tidy_tests/test_ignored/whee/test.rs | 0 python/tidy/servo_tidy_tests/test_tidy.py | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 python/tidy/servo_tidy_tests/test_ignored/whee/test.rs (limited to 'python/tidy/servo_tidy_tests') diff --git a/python/tidy/servo_tidy_tests/test_ignored/whee/test.rs b/python/tidy/servo_tidy_tests/test_ignored/whee/test.rs new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index c9291c1c2f2..170c447affa 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -113,6 +113,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) -- cgit v1.2.3