Author: bugman Date: Tue Jan 4 12:41:34 2011 New Revision: 12135 URL: http://svn.gna.org/viewcvs/relax?rev=12135&view=rev Log: Only print out the part of the optional module table when those tests are run. Modified: 1.3/test_suite/test_suite_runner.py Modified: 1.3/test_suite/test_suite_runner.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/test_suite_runner.py?rev=12135&r1=12134&r2=12135&view=diff ============================================================================== --- 1.3/test_suite/test_suite_runner.py (original) +++ 1.3/test_suite/test_suite_runner.py Tue Jan 4 12:41:34 2011 @@ -170,18 +170,31 @@ return # The formatting string. - format = "%-30s %20s %20s" + if hasattr(self, 'system_result') and hasattr(self, 'unit_result'): + format = "%-30s %20s %20s" + else: + format = "%-30s %20s" # Header. print("\nCount of tests skipped due to missing modules:\n") - header = format % ("Module", "System tests", "Unit tests") + if hasattr(self, 'system_result') and hasattr(self, 'unit_result'): + header = format % ("Module", "System tests", "Unit tests") + elif hasattr(self, 'system_result'): + header = format % ("Module", "System tests") + else: + header = format % ("Module", "Unit tests") print('-'*len(header)) print(header) print('-'*len(header)) # The table. for module in missing_modules: - print(format % (module, system_count[module], unit_count[module]) ) + if hasattr(self, 'system_result') and hasattr(self, 'unit_result'): + print(format % (module, system_count[module], unit_count[module])) + elif hasattr(self, 'system_result'): + print(format % (module, system_count[module])) + else: + print(format % (module, unit_count[module])) # End the table. print('-'*len(header))