Author: bugman Date: Tue Jan 4 11:21:07 2011 New Revision: 12118 URL: http://svn.gna.org/viewcvs/relax?rev=12118&view=rev Log: System and unit tests can be skipped is the skip flag is set inside the TestCase class. Modified: 1.3/test_suite/relax_test_loader.py Modified: 1.3/test_suite/relax_test_loader.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/relax_test_loader.py?rev=12118&r1=12117&r2=12118&view=diff ============================================================================== --- 1.3/test_suite/relax_test_loader.py (original) +++ 1.3/test_suite/relax_test_loader.py Tue Jan 4 11:21:07 2011 @@ -1,7 +1,6 @@ ################################################################################ # # # Copyright (C) 2011 Edward d'Auvergne # -# # # # # This file is part of the program relax. # # # @@ -51,7 +50,15 @@ # Generate a list of test cases. case_list = [] for i in range(len(testCaseNames)): - case_list.append(testCaseClass(testCaseNames[i])) + # Initialise the test case. + test_case = testCaseClass(testCaseNames[i]) + + # Skip. + if hasattr(test_case, 'skip') and test_case.skip: + continue + + # Append the test case. + case_list.append(test_case) # Return the test suite. return self.suiteClass(case_list)