diff options
author | Maciej Skrzypkowski <m.skrzypkows@samsung.com> | 2016-04-13 12:18:13 +0200 |
---|---|---|
committer | Maciej Skrzypkowski <m.skrzypkows@samsung.com> | 2016-04-13 12:18:13 +0200 |
commit | 13847a1131e8abae39d757e8d6bc517bcc1eaac5 (patch) | |
tree | 15f8facc7af255209546d29d3317a65fa711b4ff /python/tidy.py | |
parent | e8e354d5d3e6757c16912e7f5e6234ec5eece493 (diff) | |
download | servo-13847a1131e8abae39d757e8d6bc517bcc1eaac5.tar.gz servo-13847a1131e8abae39d757e8d6bc517bcc1eaac5.zip |
Test for check_spec function, for tidy.py #9152
Diffstat (limited to 'python/tidy.py')
-rw-r--r-- | python/tidy.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/tidy.py b/python/tidy.py index 6110a9ea4eb..660b90e9abb 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -69,6 +69,8 @@ ignored_dirs = [ os.path.join(".", "."), ] +spec_base_path = "components/script/dom/" + def is_iter_empty(iterator): try: @@ -525,10 +527,9 @@ def check_json(filename, contents): def check_spec(file_name, lines): - base_path = "components/script/dom/" - if base_path not in file_name: + if spec_base_path not in file_name: raise StopIteration - file_name = os.path.relpath(os.path.splitext(file_name)[0], base_path) + file_name = os.path.relpath(os.path.splitext(file_name)[0], spec_base_path) patt = re.compile("^\s*\/\/.+") # Pattern representing a line with a macro |