This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class B(): | |
pass | |
class A(): | |
pass | |
classes_dict = {"A": A, "B": B} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NotImplementedToExpectedFailure: | |
def run(self, result=None): | |
# Override the run method to inject the "expectingFailure" marker | |
# when the test case runs. | |
if self._testMethodName in getattr(self, 'not_implemented', []): | |
# Mark 'expecting failure' on class. It will only be applicable | |
# for this specific run. | |
method = getattr(self, self._testMethodName) | |
wrapper = lambda *args, **kwargs: method(*args, **kwargs) | |
wrapper.__unittest_expecting_failure__ = True |