[Blends-commit] [SCM] website branch, master, updated. c1d84fa355a61fabd815c21d041157b2ef53fabe

Akshita Jha akshita-guest at users.alioth.debian.org
Tue Jul 28 21:59:12 UTC 2015


The following commit has been merged in the master branch:
commit c1d84fa355a61fabd815c21d041157b2ef53fabe
Author: Akshita Jha <akshita-guest at users.alioth.debian.org>
Date:   Wed Jul 29 03:28:49 2015 +0530

    Modify test_output.py : An optional second command line argument can be given which has to be a lang in the form of 'de', 'da', 'fi' etc. Usage: ./test_output.py <Blend> <optional lang>

diff --git a/webtools_py3/test_output.py b/webtools_py3/test_output.py
index 1ea7ba7..65e356e 100755
--- a/webtools_py3/test_output.py
+++ b/webtools_py3/test_output.py
@@ -99,7 +99,7 @@ def check_diff(blend, tasks_files, outputdir):
 
 
 # get the names of tasks files in dir_path
-def task_file(dir_path):
+def task_file(dir_path, lang=''):
     tasks_files = []
     if isdir(dir_path):
         for f in listdir(dir_path):
@@ -108,6 +108,9 @@ def task_file(dir_path):
                 # get names of task files which are in english
                 if tmp[1] == 'en':
                     tasks_files.append(f)
+                if lang != '' and lang != 'en':
+                    if tmp[1] == lang:
+                        tasks_files.append(f)
             else:
                 print("%s is not a file " %f)
     else:
@@ -117,18 +120,22 @@ def task_file(dir_path):
 
 def main():
     if len(sys.argv) <= 1:
-        print("Usage: ./test_output.py <Blend>\nOutput directory : ./tests/<Blend>/<task_file.diff>")
+        print("Usage: ./test_output.py <Blend> <optional lang>\nOutput directory : ./tests/<Blend>/<task_file.diff>")
         exit(-1)
 
     blend = sys.argv[1]
+    if len(sys.argv) > 2:
+        lang = sys.argv[2]
+    else:
+        lang = ''
 
     data = ReadConfig(blend)
     outputdir = data['outputdir']
 
     # get names of old task files
-    old_tasks_files = task_file(outputdir + '/tasks')
+    old_tasks_files = task_file(outputdir + '/tasks', lang)
     # get names of new task files
-    new_tasks_files = task_file(outputdir + '/tasks_udd')
+    new_tasks_files = task_file(outputdir + '/tasks_udd', lang)
 
     # check whether the tasks files created are same or not
     if old_tasks_files == new_tasks_files:

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list