Addition of setUpClass and setUpModule shared fixtures to unittest.
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index 19b196c..0bfcc75 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -153,6 +153,9 @@
longMessage = False
+ # Attribute used by TestSuite for classSetUp
+
+ _classSetupFailed = False
def __init__(self, methodName='runTest'):
"""Create an instance of the class that will use the named test
@@ -211,6 +214,14 @@
"Hook method for deconstructing the test fixture after testing it."
pass
+ @classmethod
+ def setUpClass(cls):
+ "Hook method for setting up class fixture before running tests in the class."
+
+ @classmethod
+ def tearDownClass(cls):
+ "Hook method for deconstructing the class fixture after running all tests in the class."
+
def countTestCases(self):
return 1