From 46b9f89f5e46109ea811ccf474acb09616e7c33b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 23 Aug 2017 15:36:39 +1000 Subject: Tests: fix incorrect check for hidden dir Copy-pasted mistake in tests and tools. --- tests/check_deprecated.py | 6 ++---- tests/python/batch_import.py | 6 ++---- tests/python/bl_load_py_modules.py | 5 ++--- tests/python/bl_run_operators.py | 6 ++---- 4 files changed, 8 insertions(+), 15 deletions(-) (limited to 'tests') diff --git a/tests/check_deprecated.py b/tests/check_deprecated.py index cf8f8e0cc35..6e07f8fdb31 100644 --- a/tests/check_deprecated.py +++ b/tests/check_deprecated.py @@ -53,10 +53,8 @@ def is_source_any(filename): def source_list(path, filename_check=None): for dirpath, dirnames, filenames in os.walk(path): - - # skip '.svn' - if dirpath.startswith("."): - continue + # skip '.git' + dirnames[:] = [d for d in dirnames if not d.startswith(".")] for filename in filenames: if filename_check is None or filename_check(filename): diff --git a/tests/python/batch_import.py b/tests/python/batch_import.py index bbe3a70327f..a6e2469349b 100644 --- a/tests/python/batch_import.py +++ b/tests/python/batch_import.py @@ -72,10 +72,8 @@ def batch_import( def file_generator(path): for dirpath, dirnames, filenames in os.walk(path): - - # skip '.svn' - if dirpath.startswith("."): - continue + # skip '.git' + dirnames[:] = [d for d in dirnames if not d.startswith(".")] for filename in filenames: if pattern_match(filename): diff --git a/tests/python/bl_load_py_modules.py b/tests/python/bl_load_py_modules.py index 2d8a908406f..39e7bd33d44 100644 --- a/tests/python/bl_load_py_modules.py +++ b/tests/python/bl_load_py_modules.py @@ -93,9 +93,8 @@ def addon_modules_sorted(): def source_list(path, filename_check=None): from os.path import join for dirpath, dirnames, filenames in os.walk(path): - # skip '.svn' - if dirpath.startswith("."): - continue + # skip '.git' + dirnames[:] = [d for d in dirnames if not d.startswith(".")] for filename in filenames: filepath = join(dirpath, filename) diff --git a/tests/python/bl_run_operators.py b/tests/python/bl_run_operators.py index 7d5f4127378..7b6b97e5ad1 100644 --- a/tests/python/bl_run_operators.py +++ b/tests/python/bl_run_operators.py @@ -100,10 +100,8 @@ def blend_list(mainpath): def file_list(path, filename_check=None): for dirpath, dirnames, filenames in os.walk(path): - - # skip '.svn' - if dirpath.startswith("."): - continue + # skip '.git' + dirnames[:] = [d for d in dirnames if not d.startswith(".")] for filename in filenames: filepath = join(dirpath, filename) -- cgit v1.2.3